opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.5k stars 827 forks source link

Add null check as extra safety measure to ensure class exists and is valid #308

Closed KennethScott closed 6 years ago

KennethScott commented 6 years ago

Windows Server 2016 was returning null when attempting to check if Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor existed, as the class did exist but had no properties. This was causing the IsVMHost() check to incorrectly identify 2016 servers as VM Hosts. Ref #305.