On the client machine:
...
- To enable Credential Security Service Provider (CREDSSP) authentication on the local client machine
- Enter Enable-WSManCredSSP -Role client -DelegateComputer “SharePointServerName”
- Enter Enable-WSManCredSSP -Role client -DelegateComputer “SharePointServerName”
- To open a credentials prompt box
- Enter $cred=get-Credential
- Enter and an administrators account (or the admin account you worked with in the Server Requirements) to run the rest of the PowerShell commands with this account
- To create a new remote session to the SharePointServerName using the authentication type CredSSP and the credentials previously entered
Enter $s=new-PSsession “SharePointServerName” - authentication credssp -credential $cred
Warning If this fails with an "access denied" error, re-run step 7a on the server (Server Requirements) to enable configuration of the x64 PowerShell (i.e. Set-PSSessionConfiguration -Name Microsoft.PowerShell32 –ShowSecurityDescriptorUI) - To load the SharePoint snap-in to the current session to allow SharePoint related scripts to be executed
- Enter Invoke-Command -Session $s -ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
- Enter Invoke-Command -Session $s -ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
- To return all content databases in your SharePoint farm (which ensures you have access)
- Enter Invoke-Command -Session $s -ScriptBlock {get-SPContentDatabase}
- Enter Invoke-Command -Session $s -ScriptBlock {get-SPContentDatabase}
- To return all SharePoint service instances (which ensures you have access)
- Enter Invoke-Command -Session $s -ScriptBlock {get-spserviceinstance}
- Enter Invoke-Command -Session $s -ScriptBlock {get-spserviceinstance}
- To attempt to use the PS Session to ensure connectivity between the two machines
- Enter Enter-PSSession -session $s
- You will now see the server(s) name in [ ] PS: c:\users\someuser\documents (Example: [sp2013-app.fabrikaminc.local]: PS C:\Users\adamb\Documents>)