SCCM collection for Virtual or Physical computers

Computers that are running on virtual(Virtual PC or VMware etc) will have an entry in win32_computersystem with attribute model in WMI.

You can create a collection to using table called SMS_G_System_COMPUTER_SYSTEM.

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_COMPUTER_SYSTEM on
SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId
where SMS_G_System_COMPUTER_SYSTEM.Model like "%Virtual%"

To list all physical computers ,create another collection using operator not in from above collection like below:

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 where SMS_R_System.ResourceId not in (select SMS_R_SYSTEM.ResourceID from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model like "%Virtual%")

Hope it helps.

4 Responses to "SCCM collection for Virtual or Physical computers"

  1. Hi, I installed SCCM. And I want to add my physical network devices in the environment, how can I do this. I tried many methods but it didn't work.

    Reply
    1. Hi Bob,
      can you post your query here for me to look at it? if possible, screenshot of the query out (you can hide the server names).

      Thanks,
      Eswar

      Reply

Leave a Reply