I only know of 2 methods for PowerShell Remoting in SharePoint 2010. You need to enable PSRemoting and CredSSP on both the client and server for these to happen. CredSSP is a requirement because there since SharePoint cmdlets call SQL, there will be a double hop.
- Connect to the SharePoint server and essentially execute remote commands on the sp10 server itself.
# Only need to do this part for initial setup for storage of username and pwd # and to turn on the Powershell remoting feature Enable-PSRemoting Enable-WSManCredSSP -Role client -DelegateComputer * Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File C:\crd-sharepoint.txt # Type Password Here # This needs to be executed before you can connect to the SharePoint farm/cmdlets $Pwd = Get-Content C:\crd-sharepoint.txt | ConvertTo-SecureString $Cred = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList "domain\username",$Pwd Enter-PSSession ` -ComputerName servername ` -Authentication CredSSP ` -Credential $Cred Add-PSSnapin Microsoft.SharePoint.Powershell
- This will import all SharePoint 2010 Powershell Commands into a local session (Powershell Implicit Remoting).
# If you want to save credentials for an account (credentials need to be # specified using CredSSP Auth). Only need to run once Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File C:\crd-sharepoint.txt # Type Password Here # You could add this to a logon script to automatically import the sharepoint # powershell commands into your session $Pwd = Get-Content C:\crd-sharepoint.txt | ConvertTo-SecureString $Cred = New-Object ` -TypeName System.Management.Automation.PSCredential ` -ArgumentList "domain\username",$Pwd $Session = New-PSSession servername ` -Authentication CredSSP ` -Credential $Cred Invoke-Command $Session { Add-PSSnapin Microsoft.SharePoint.Powershell } Import-PSSession -Session $Session # This takes a minute or so to spin up so you could save it to disk. # This will NEED to be ran before running import-pssession Export-PSSession ` -Session $Session ` -OutputModule "SP2010" ` -CommandName *-SP* #Import Saved file from disk Import-Module SP2010