Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

How to Add PowerShell snapin on REMOTE servers

$
0
0

HI All,

I have 1 query, can u anybody help me to get it done

I have created ps1 file that will make remote connection on series of servers(max 4 server at a time)

and execute Get/Set-SPContentDeploymentJob cmd remotly- to execuute we have to add psSnapin,

I am able to execute commands and getting back output but unable to execute cmdlets on remote server that needs PSSnapin,

I tried

by calling remote ps1 file Invoke-Command -ComputerName $get_Server_names[0] -ScriptBlock {C:\top\SP-Monitor.ps1} -credential $user 

by calling Local ps1 file Invoke-Command -ComputerName $get_Server_names[0] -FilePath 'C:\op\CDJ Logs\Get_CDJ_Dtl.ps1'

but it gets hang/not sure-take 10+mins but snapin doesnt adds and no further execution happnes


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>