How to create an SCCM query for all systems with the Hyper-V role installed

sccm

As per the title, really. Haven't been able to find a way to create an SCCM 2007 R3 (System Center Configuration Manager) that will list all Windows 2008 and 2008 R2 systems with the Hyper-V role installed. Any help would be appreciated.

Best Answer

Probably the easiest way to get a simple list would be to take advantage of one of the built-in reports, such as the "Services - Computers running a specific service" report. You can then just input a service common to Hyper-V hosts, such as "Hyper-V Virtual Machine Management" (note that I know more about SCCM than Hyper-V this might not be the right service to look for, I just got it from looking at the running services report from a few of our Hyper-V servers).

You should be able to access this through SCCM's web reports with a URL like:

http://siteserver/SMSReporting_sitecode/Report.asp?ReportID=40&variable=Hyper-V%20Virtual%20Machine%20Management

Alternatively if you're trying to create a collection query, the equivalent WQL would be:

select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client
from  SMS_R_System
inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_SERVICE.DisplayName like "Hyper-V Virtual Machine Management"