AutoSPInstaller – error connecting to remote server

I’m using AutoSPInstaller to build a multi-server SharePoint 2013 farm on Windows 2012R2 for the first time.  All has gone well up to the point of configuring the remote servers.  It fails with this error:

New-PSSession : [SERVER2] Connecting to remote server SERVER2 failed with the following error message :
The WinRM client cannot process the request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the unencrypted traffic setting in the service configuration or specify one of the authentication mechanisms supported by the server.  To use Kerberos, specify the computer name as the remote destination. Also verify that the client computer and the destination computer
are joined to a domain. To use Basic, specify the computer name as the remote destination, specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by server:
Negotiate Kerberos For more information, see the about_Remote_Troubleshooting Help topic.
At \\server\share\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:6245 char:20
+         $session = New-PSSession -Name “AutoSPInstallerSession-$server” -Authent …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed

New-PSSession

I Googled various parts of this error message and found various suggestions to resolve the issue, none of which worked for me.  After a lot of trial and error I found that manually enabling Credential Security Support Provider (CredSSP) authentication on each remote server got me past this hurdle.  This is the command required:

enable-wsmancredssp –role server

Enable_CredSSP

[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]