Share via


VMs Listed in SCCM Physical Server Collection

Question

Friday, February 10, 2017 7:34 PM

Looking over the Servers | Physical collection in SCCM I spotted quite a few VMs listed there. Not sure if in the past these were part of a P2V and it never figured itself out. Anyone ever come up against this? How did you fix it? Also noticed if I select the virtual field in the search criteria of the Servers | Physical collection, it does say YES to virtual!

All replies (6)

Saturday, February 11, 2017 4:34 PM âś…Answered

So this is NOT a default collection. Someone at your office created it. I fixed one of the mistakes in the query and make it readable. Also keep in mind that if the VM doesn't have the CM client installed on it, it will also fall within the collection too.

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 
        where 
            SMS_R_System.IsVirtualMachine = 'True') 
    and SMS_R_System.OperatingSystemNameandVersion like 'Microsoft Windows NT%Server%'

Garth Jones

Blog: http://www.enhansoft.com/blog Old Blog: http://smsug.ca/blogs/garth_jones/default.aspx

Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleased


Friday, February 10, 2017 8:28 PM

What's the query for that collection?


Saturday, February 11, 2017 4:16 PM

It's a default collection by SCCM. Here it is:

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_R_System.IsVirtualMachine = 'True') and SMS_R_System.OperatingSystemNameandVersion like 'Microsoft Windows NT%Server%'

Monday, February 13, 2017 7:10 AM

"Server | Physical" is one of a collection from "Operational Collection"  by Benoit Lecours on Gallery at below:

https://gallery.technet.microsoft.com/Set-of-Operational-SCCM-19fa8178#content

You can update your collection query to correct this issue. It's better to give a comment to Lecours so that he will know this.

In my opinion, I compared these two queries, there should not be any difference although join SMS_G_System_COMPUTER_SYSTEM looks useless here. Both are basically based on condition Server ResourceID not in "SMS_R_System.IsVirtualMachine = 'True' ". It's Boolean, should not like this. You can take one and check more on WMI class instance using WMI explorer tool

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, February 14, 2017 8:39 PM

Thank you, this was helpful.


Tuesday, February 14, 2017 8:48 PM

Thanks for the help everyone.  For the most part in this environement, I am able to create distinct collections now to differentiate between the physical and virtual servers with the query listed above.

I am still convinced there is something with a few VMs here where they will show up as physicals and virtuals with collection scripts that are simple enough for most all cases to work except with a few VMs,  but I feel something is hidden under the hood to confuse the matter.