Remote install fails - PSExec

Apr 26, 2013 at 6:51 PM
Edited Apr 26, 2013 at 7:09 PM
Hi, I have had problems today running an install remotely. The script completed up until the point where it kicks off the ps remote sessions to configure additional servers.

Firstly, the machines had no internet so I had to download psexec from sysinternals website and copy into the installer directory. Are there multiple versions of this tool or should the version from the website be the correct one?

After copying in the file, I am eventually prompted to enter a password? It seems that the credentials are not being passed in properly in the line where new-psremotesession is kicked off. Any ideas why this would happen? Windows firewall is off on all servers and I can ping all additional remote servers. When I do enter the password for the install account it just fails out.

This was one of the error messages I got:
Enter-PSSession : Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests
This is the current error:
the winrm client cannot process the request. the authentication mechanism requested by the client is not supported
Apr 27, 2013 at 10:40 AM
See below for what I am prompted with... it could be something to do with setup of WinRM or WSMan but I don't know anything about it.

Image
Apr 27, 2013 at 11:44 AM
Edited Apr 27, 2013 at 3:04 PM
Before it prompts for password it looks like it says "starting psexec on remote server". Considering these machines don't have internet access do I need to copy psexec to the remote machines?

Is there anywhere else to check for log entries to try to work this out?

My guess is that the credentials are somehow not getting passed in this section around line 5262
    Write-Host -ForegroundColor White " - Enabling PowerShell remoting on `"$server`" via PsExec..."
    Start-Process -FilePath "$psExec" `
                  -ArgumentList "/acceptEula \\$server -u $username -p $password -h powershell.exe -Command `"$configureTargetScript`"" `
                  -Wait -NoNewWindow
Edit: would spaces in my service account names cause any problems i.e. domain\my user?
Apr 27, 2013 at 5:01 PM
Success! I wrapped the username inside quotes and it worked. Maybe worth noting this on the known issues that service account names containing spaces will cause problems?

The updated argument list is now...
-ArgumentList "/acceptEula \\$server -u `"$username`" -p $password -h
(notice escaped output otherwise this fails)