Author Posts

August 20, 2014 at 6:03 am

Good Morning,
I need to access the sharepoint cmdlets from a management server.
I have created a new-possession between the management server and the sharepoint server $g = new-possession -cn xxx -authentication credssp -cred $cred– have enabled wsmancredssp on each machine client on management server and sharepoint has server
I have added the Microsoft.sharepoint.powershell snapin (invoke-command -session $g -scriptblock {add-pssnapin -name Microsoft.sharepoint.powershell}
in addition check with the get-pssnapin to verify it is there (get-pssnapin -name Microsoft.sharepoint.powershell -registered) returns that is there
then try invoke-command -session $g -scriptblock {get-spweb https://mcs.xxxxx.sgn}
error back is that get-spweb is not a name of a cmdlet etc...
any ideas

August 20, 2014 at 8:01 am

Can you try performing the same tasks – loading the snapin, verifying it, and then attempting to run the command – by using Enter-PSSession to interactively connect to the server? That would be a good troubleshooting step. Do any other SharePoint commands load, or does it appear as if they are all unavailable?