Check WinRM HTTPS Connection
Windows Remote Management testen
Beim Einsatz bzw. bei der Einrichtung von Windows Remote Management kann so einiges schief gehen oder vergessen werden.
Wenn man nicht weiß. ob alles sauber konfiguriert wurde kann das Dokument Windows Remotemanagement Troubleshooting HTTPS eventuell helfen.
Check WinRM HTTPS Connection
In diesem Artikel möchte ich noch weitere Prüfmethoden (Skripte) für WinRM over HTTPS vorstellen.
Wenn WinRM over HTTPS mit expliziten Anmeldeinformationen funktioniert dann gibt es eine Antwort zurück, und zwar die Version des entfernten Betriebssystems. Es lässt sich auch ein Dienstkonto überprüfen.
Windows Remote Management testen
# Windows mit expliziten Anmeldeinformationen und aktivem WinRM-HTTPS-Listener:
$ip = „172.18.32.5“
$user = „Administrator“
$pass = „Password“ | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($user, $pass)
$pso = New-PSSessionOption -SkipCACheck -SkipCNCheck
Invoke-Command -ComputerName $ip -Credential $cred -Authentication Negotiate -Port 5986 -UseSSL -SessionOption $pso {
if ((Get-Item -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘).Property.Contains(‚ProductName‘))
{
(Get-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘ -Name ‚ProductName‘).ProductName
}
}
# Windows mit expliziten Anmeldeinformationen und aktivem WinRM-HTTP-Listener:
$ip = „172.18.32.5“
$user = „Administrator“
$pass = „Password“ | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($user, $pass)
$pso = New-PSSessionOption -SkipCACheck -SkipCNCheck
Invoke-Command -ComputerName $ip -Credential $cred -Authentication Negotiate -Port 5985 -SessionOption $pso {
if ((Get-Item -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘).Property.Contains(‚ProductName‘))
{
(Get-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘ -Name ‚ProductName‘).ProductName
}
}
# Windows mit Anmeldeinformationen für das Dienstkonto und aktivem WinRM-HTTPS-Listener:
$ip = „172.18.32.5“
$pso = New-PSSessionOption -SkipCACheck -SkipCNCheck
Invoke-Command -ComputerName $ip -Authentication NegotiateWithImplicitCredential -Port 5986 -UseSSL -SessionOption $pso {
if ((Get-Item -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘).Property.Contains(‚ProductName‘))
{
(Get-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘ -Name ‚ProductName‘).ProductName
}
}
# Windows mit Anmeldeinformationen für das Dienstkonto und aktivem WinRM-HTTP-Listener:
$ip = „172.18.32.5“
$pso = New-PSSessionOption -SkipCACheck -SkipCNCheck
Invoke-Command -ComputerName $ip -Authentication NegotiateWithImplicitCredential -Port 5985 -SessionOption $pso {
if ((Get-Item -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘).Property.Contains(‚ProductName‘))
{
(Get-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion‘ -Name ‚ProductName‘).ProductName
}
}
- WinRM Management Tool Professionell für 19,00 €


