WARNING: Couldn't create remote session to SERVERNAME

Jun 11, 2013 at 2:31 PM
Edited Jun 12, 2013 at 1:40 PM
Hi all,
I´m running a multi server install from a non SharePoint server (controller) and getting this error when the Autospinstaller script tries to open the new remote session window when creating the User Profile Application:
WARNING: Couldn't create remote session to SERVERNAME; trying again...
  • Enabling remoting to SERVERNAME...
  • Creating temporary "remote" session to SERVERNAME...
    WARNING: Couldn't create remote session to SERVERNAME; trying again...
Everything else installs fine, it´s just that pop-up windows that doesn´t work and UPS cannot be installed.

Anyone?

Thanks!
Jun 19, 2013 at 4:37 PM
Did the other servers deploy remotely ok?

Easy workaround is to just run the script from that server by navigating to your shared location in powershell on the server in question.

Once done just stop the script before it tries to remote to other servers in the script.
Aug 22, 2013 at 6:55 AM
Edited Aug 22, 2013 at 6:56 AM
This seems to be a problem in Server 2012. I have done remote inställs from Server 2008 R2 without this issue. Anyone with similar issues or perhaps a solution to this?
Aug 22, 2013 at 1:41 PM
This is where it fails:

Else # Do some fancy stuff to get this to work over a remote session
    {
        Write-Host -ForegroundColor White " - Enabling remoting to $env:COMPUTERNAME..."
        Enable-WSManCredSSP -Role Client -Force -DelegateComputer $env:COMPUTERNAME | Out-Null # Yes that's right, we're going to "remote" into the local computer...
        Start-Sleep 10
        Write-Host -ForegroundColor White " - Creating temporary `"remote`" session to $env:COMPUTERNAME..."
        $UPSession = New-PSSession -Name "UPS-Session" -Authentication Credssp -Credential $farmCredential -ComputerName $env:COMPUTERNAME -ErrorAction SilentlyContinue
        If (!$UPSession)
        {
            # Try again
            Write-Warning "Couldn't create remote session to $env:COMPUTERNAME; trying again..."
            CreateUPSAsAdmin $xmlinput
        }
        # Pass the value of $scriptFile to the new session
        Invoke-Command -ScriptBlock {param ($value) Set-Variable -Name ScriptFile -Value $value} -ArgumentList $scriptFile -Session $UPSession
        Write-Host -ForegroundColor White " - Creating $userProfileServiceName under `"remote`" session..."
        # Start a (local) process (on our "remote" session), then spawn an elevated process within to finally execute the script file that actually creates the UPS
        Invoke-Command -ScriptBlock {Start-Process -FilePath "$PSHOME\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass $scriptFile" -Verb Runas} -Session $UPSession
    }
Aug 27, 2013 at 6:11 AM
No one having the same issue on Windows Server 2012 and remote installs?
Sep 21, 2013 at 2:55 AM
I'm having exactly the same issue. Also running server 2012.
Sep 21, 2013 at 12:52 PM
Edited Sep 21, 2013 at 12:55 PM
I had to separately run "Enable-PSRemoting -Force" followed by "winrm quickconfig" on the Windows 2012 Server after it joined the domain and before I installed the Script for this to work for me. I am using a SysPrep'ed image to start the installation of SharePoint 2013 and there maybe more to this.
Sep 25, 2013 at 5:53 AM
I'm having the same issue, too.
I'm running Windows Server 2012 both controllers (Workgroup) and Sharepoint server (domain joined).

Enable-PSRemoting -Force again not help me.

Stop script with Control-C, and just type same command below is succeeding.
This is strange.
New-PSSession -Name "UPS-Session" -Authentication Credssp -Credential $farmCredential -ComputerName $env:COMPUTERNAME
I used farmadmin account name and password.


I already executed these commands

To controller
Enable-PSRemoting -SkipNetworkProfileCheck -Force
Set-Item WSMan:\localhost\client\trustedhosts * -Force
Enable-WSManCredSSP -Role Client -DelegateComputer * -Force 
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentials -Name WSMan -Value WSMAN/* 
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsDomain -Name WSMan -Value WSMAN/*
To SharePoint server
Enable-WSManCredSSP -Role Server -Force
Enable-PSRemoting -SkipNetworkProfileCheck -Force
Are there any help?
Sep 25, 2013 at 7:11 AM
Sorry, I confused.

I misunderstood about source server and destination server.
There are many remote sessions like below, (I think).

controller(workgroup) -> (RemoteSession) -> SQL Server(domain) execute autoSPInstaller ->(RemoteSession) -> SharePoint Server(domain) -> (RemoteSession) -> SharePoint Server(domain)(localhost)


I'm going to change the place where script kick.
Sep 25, 2013 at 2:21 PM
Any chance it is related to an issue I had? See:
https://autospinstaller.codeplex.com/workitem/19864