I have a PRTG-Sensor that checks servers' Windows Updates Status. It gets automatically created with a template, normally it should work fine. We have 94 of these sensors running, and one won't work on a new Windows 2022 server, which is our new WSUS server. The sensor executes a PowerShell script and uses Windows Remote Management (Port 5985) for it. The server returns this error:
Connecting to remote server failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
I've tried the following:
- Changed the network firewall's rule to explicitly open port 5985 on the target to the source
Set-ExecutionPolicy unrestrictedandEnable-PSRemotingandwinrm quickconfig- Updated the Windows firewall-rule for WinRM (public rule listened only to Local subnet) as suggested here: https://stackoverflow.com/a/60063137
- Checked if target system was listening to it's own IP (tried with and without) Remote PowerShell, WinRM Failures: WinRM cannot complete the operation
- Changed WinRM GPOs WinRM will not connect to remote computer in my Domain
netstat -anp tcpshows that tcp/5985 is listening- Error in EventViewer says the following, which I'm pretty sure I did
The WinRM service could not use the following listener to receive WS-Management requests. The listener is enabled but the listener does not have an IP address configured.
User Action Check the underlying network configuration to determine if this listener has at least one valid IP. If the IP is valid, ensure that WinRM configuration does not exclude that IP address by using the following command:
winrm get winrm/config/service
Additional Data Listener transport: HTTP
Listener address: *
- Checked if the Registry had all values The Server Manager WinRM plug-in might be corrupted or missing on W2K12R2
I'm just really confused, because it should work fine without any configuration. Methinks something happened while configuring WSUS on the source system.
EDIT: Here's some helpful command outputs:
command output of win get winrm/config
command output of winrm get wmicimv2/Win32_Service?Name=WinRM
What's really weird aswell that I forgot to mention is that all the other sensors on the machine work.