Você está na página 1de 1

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.IPSubnets LIKE '192.168.2[1-9].0'
msutliff responded to a recent forum thread and provided a great example and que
ry with which to create a ConfigMgr Collection based on IP ranges.
Here s the solution:
Example:
To make a collection based on the IP Ranges:
10.18.16.0/20 and 10.18.32.0/20

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.IPSubnets like '10.18.1[6-9].0'
or SMS_R_System.IPSubnets like '10.18.4[0-7].0'
or SMS_R_System.IPSubnets like '10.18.[2-3][0-9].0'

Hi,
IN SCCM we can do a collection of machines based on subnet query with the follow
ing:.
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.IPSubnets = X.X.X.X
If you want to do queries with various subnets you can use this:
select * from SMS_R_System where SMS_R_System.IPSubnets in ( X.X.X.X , X.X.X.X )

So the way I usually do this is to use the network adapter configuration IP addr
ess. Im not sure why you say you cant use the % wildcard.
The query below is for subnet 192.168.100.% or subnet 192.168.101.%
select * from SMS_R_System inner join SMS_G_System_NETWORK_ADAPTER_CONFIGURATI
ON on SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceId = SMS_R_System.Resou
rceId where SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.IPAddress like "192.168.1
00.%" or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.IPAddress like "192.168.101.
%"

Você também pode gostar