SharePoint Managment Shell via remote session
You can run a SharePoint Management Shell remotely with the following lines of powershell
1 2 3 |
$Remotesession = New-PSSession -computername "MY_SPServer_Name_Goes_Here" -Authentication CredSSP -Credential $crd Invoke-Command -Session $Remotesession -ScriptBlock{Add-PsSnapin Microsoft.SharePoint.PowerShell} |
Note, that at this point, you can run whatever administrative PowerShell commands you need to run by using the Invoke-Command -Session $session -ScriptBlock{} … Read More