SCCM 2012 / 2016 SCCM Collection Query based on multiple IP Subnets

No comments

SCCM 2012/2016 SCCM Collection Query based on multiple IP Subnets

If you are currently trying to create a collection where it pulls clients on specific subnets the utilizing this query will help you a lot.
1. On your SCCM Admin Console go to Device Collections then Open/Create you new collection limit to All Systems for example in my case HQ.
2. Once the collection properties are open Go to the Membership Rules, Add Query Rule, assign a Name, Edit query statement  then paste the following WQL.
image
image
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_NETWORK_ADAPTER_CONFIGURATION on SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceID = SMS_R_System.ResourceId where SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.IPAddress like "10.1.110.%" or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.IPAddress like "10.1.1.%"

3. As you can see on my query I have configured to only pull those two subnets, just change those to match the subnet you're trying to scan and that's it.


 Feel free to copy and share :) 






No comments :

Post a Comment