Words from Stephane Thirion : Rodolphe is a friend and also a very smart Microsoft dude, I used to work with him and having such a smart guy on my side has been a pleasure in all the project we had to work on together.
This week I worked at a customer for an Active Directory migration to Windows Server 2012 R2. The supplied servers have been promoted with a bad IP address. We realised the change of IP address and therefore, cannot install new roles and features. An error at each run a WinRM problem “Failed to open the runspace pool.” “The Server Manager WinRM plugin might be corrupted or missing.
After much research, it seems that the configuration of listeners is non-existent and that authentication protocols are more configured.
I gathered all the parameters which have corrected this error in this script.
<#The Server Manager WinRM plug-in might be corrupted or missing on W2K12R2#>
#Add listner Loopback address
netsh http add iplisten 127.0.0.1
netsh http add iplisten ::1
#init variable
$Path="HKLM:SOFTWAREMicrosoftWindowsCurrentVersionWSMANClient"
$key1 = "auth_kerberos"
$key2 = "auth_negotiate"
#Check Key and create if not present
if (-not (Test-Path .$Key1)) {
Set-ItemProperty -Path $Path -Name $key1 -Value 1 -Type DWord -Force
}
if (-not (Test-Path .$Key2)) {
Set-ItemProperty -Path $Path -Name $key2 -Value 1 -Type DWord -Force
}
#Location to system drive
Set-Location c:
#Force restart service WinRM
Restart-Service "WinRM" -Force -Verbose