I use PS Remoting 2.0 for deploy WSP projects in Sharepoint 2010 in Windows 2008 server (named DESMOSSW03). My client is Windows 7 64 bits (named MyUser).
I use this credentials MyDomain\UserForInstaller for execute remote scripts. This user is "Farm Administrator" and has permissions SharePoint_Shell_Access (reference: http://geeks.ms/blogs/lruiz/archive/2011/02/15/moss2010-the-local-farm-is-not-accessible-cmdlets-with-featuredependencyid-are-not-registered.aspx)
I execute my script ps1 by PS Remoting I get this error:
Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.
Fails in line:
Update-SPSolution -Identity Test.wsp -LiteralPath C:\Temporal\InstalacionTest\Test.wsp -GACDeployment -Force
If I execute my script ps1 logged in DESMOSSW03, all is right. But using PS Remoting from MyUser machine to DESMOSSW03 server is wrong.
Farm Administrator Site Colleciton Admin Shell Admin (rol Sharepoint Shell Access en DB) db_owner in SharePoint_Config secureadmin in DB belongs to AD, domain users local Administrator in server powershell.exe in cliente maquina is executed like Administrator (local administrator)
PowerShell Remoting for Sharepoint requieres configure "CredSSP"
PowerShell Remoting for SharePoint SharePoint 2010 with Windows PowerShell Remoting Step by Step http://blogs.msdn.com/b/besidethepoint/archive/2010/05/26/powershell-remoting-for-sharepoint.aspx http://blogs.msdn.com/b/opal/archive/2010/03/07/sharepoint-2010-with-windows-powershell-remoting-step-by-step.aspx
Problems for CredSSP: not works in Windows XP and security issues:
Not good for production environment ??
Microsoft not recommend it ?
Caution: Credential Security Service Provider (CredSSP) authentication, in which the user's credentials are passed to a remote computer to be authenticated, is designed for commands that require authentication on more than one resource, such as accessing a remote network share. This mechanism increases the security risk of the remote operation. If the remote computer is compromised, the credentials that are passed to it can be used to control the network session. Ref: http://technet.microsoft.com/en-us/library/dd347668.aspx
Any suggestions ?