The Operations Manager Server Could Not Execute WMI Query Select * From Win32_OperatingSystem

If you experience issues deploying- or discovering servers in SCOM2012 SP1 (with the above error) the most common issue is the firewall. Only openening the management port for SCOM is not enough (5723). It’s difficult to find out what’s wrong so here’s a quick checklist:

1
2
3
4
5
Ensure agent push account has local admin rights on the server 
Firewall is not blocking any ports*
Inspect WMI service, health, and rebuild repository if necessary**
Firewall is blocking ICMP
Incorrect DNS settings

These ports always need to be opened (make sure to notice the difference between Windows Server 2003- and 2008):

RPC endpoint mapper                             Port number: 135             Protocol: TCP/UDP
RPC/DCOM High ports (2000/2003 OS)              Ports 1024-5000              Protocol: TCP/UDP
RPC/DCOM High ports (2008 OS)                   Ports 49152-65535            Protocol: TCP/UDP
NetBIOS name service                            Port number: 137             Protocol: TCP/UDP
NetBIOS session service                         Port number: 139             Protocol: TCP/UDP
SMB over IP                                     Port number: 445             Protocol: TCP 

To check whether WMI is healthy please follow these steps:

1
2
3
4
5
6
7
Log on to the server with the domain\administrator account
Start – run – WBEMTEST
Click on Connect
In the Namespace box, enter \\<computername>\root\cimv2 and click on Connect
Click on Query
In the query box, enter “Select * from Win32_OperatingSystem” and click on Apply
No message? Healthy! Message? Unhealthy.

Original error: