Jump to content


mjnako

SCCM 2012 Unknown Computers Query

Recommended Posts

My current environment has 5 primary sites and will continue to grow to around 20. In an effort to avoiding having a ton of task sequences deployed to the All Unknown Computers device collection I am trying to create an unknown device collection for each site. I have created a device collection with its limiting collection set to All Unknown Computers. Additional I have the following query statement that looking for whether or not the client is installed and if the machine falls within a specific IP range.

 

Query Statement

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.Client = 1) and SMS_R_System.IPAddresses > "10.104.100.0" and SMS_R_System.IPAddresses < "10.104.121.255"

 

This query is set to run every 5 minutes

 

 

When I change the limititing collection to All Systems it is able to populate the known machines that do no not have the client installed however it does not pick up any out of the box machines that I am trying to image.

 

Any ideas would be greatly appreciated.

 

Thanks

 

Mike

Share this post


Link to post
Share on other sites

You Greater than and Less than are not going to work the way you expect them too.

 

IP address are a String no a number, Therefore they are treated as a sting and you will get odd results as such.

 

Try something like

SMS_R_System.IPAddresses like "10.104.1[0-1]%”

Or SMS_R_System.IPAddresses like "10.104.12[0-1]%”

Share this post


Link to post
Share on other sites

The query works how it is set. It is currently finding all known machines that do not have the client installed when I change my limited collection to all systems. I am unsure how to go about finding out of the box machines that fall into that ip range.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.