SMS/ConfigMgr SQL query to list the systems in specific IP subnets

SELECT SYS.Netbios_Name0, SYS.User_Domain0, SYS.User_Name0, AIP.IP_Subnets0, SYS.Client_Version0
FROM v_R_System  as SYS
JOIN v_RA_System_IPSubnets as AIP on SYS.ResourceID=AIP.ResourceID
WHERE AIP.IP_Subnets0 in ('192.168.0.0','192.168.1.0')
Order by SYS.Netbios_Name0

Replace '192.168.0.0','192.168.1.0'... with your list of IP Subnets.

0 comments:

Post a Comment