Check WinRM status for an SCCM client

If configuring WinRM is prevented by policies, it can still be resolved by performing the following: Only works once, as soon as the policy is forced to be executed again, the settings are undone and it does not work.

Run the following as administrator:

winrm quickconfig

Open Command Prompt (cmd.exe) and enable UAC by adding the following Regkey

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

Run PowerShell as Administrator and then do the following:

winrm s winrm/config/client '@{TrustedHosts="RemoteComputer"}'

Open Command Prompt (cmd.exe) and perform the next step to disable UAC again with a regkey

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 0 /f

Test remote connection from the server:

winrs -r:RemoteComputer dir

You must of course ensure that the firewall rules “Windows Remote Management (HTTP-In)” TCP port 5985 is open, otherwise a WinRM connection will not be possible.

Leave a Reply

Your email address will not be published. Required fields are marked *