:::: MENU ::::
Monthly Archives: June 2016

Boundaries With Count of Devices

SELECT
IP_Subnets0 AS ‘Subnets Detected’,
vSMS_Boundary.Value AS ‘Sorted:Boundary Values’,
COUNT(v_RA_System_IPSubnets.ResourceID)AS ‘Count of Devices’,
vSMS_Boundary.DisplayName,
vSMS_Boundary.CreatedOn,
vSMS_Boundary.ModifiedOn
FROM v_RA_System_IPSubnets
Full Join vSMS_Boundary on vSMS_Boundary.Value =
v_RA_System_IPSubnets.IP_Subnets0
Where (v_RA_System_IPSubnets.IP_Subnets0 like ‘172.1[6-9].%’ or
v_RA_System_IPSubnets.IP_Subnets0 like ‘172.2[0-9].%’ or
v_RA_System_IPSubnets.IP_Subnets0 like ‘172.3[0-1].%’) or
(vSMS_Boundary.Value like ‘172.1[6-9].%’ or
vSMS_Boundary.Value like ‘172.2[0-9].%’ or
vSMS_Boundary.Value like ‘172.3[0-1].%’)or
v_RA_System_IPSubnets.IP_Subnets0 like ’10.%’ or
v_RA_System_IPSubnets.IP_Subnets0 like ‘192.168.%’ or
vSMS_Boundary.Value like ’10.%’ or
vSMS_Boundary.Value like ‘192.168.%’
Group By vSMS_Boundary.Value,
v_RA_System_IPSubnets.IP_Subnets0,vSMS_Boundary.DisplayName,vSMS_Boundary.CreatedOn,vSMS_Boundary.ModifiedOn
Order By [Sorted:Boundary Values]


How to find SCCM 2012 collection location

<strong>select c.SiteID as 'Collection ID',c.CollectionName,f.Name </strong>
<strong>as 'Folder Name' from vCollections c</strong>
<strong>inner join FolderMembers fm on fm.InstanceKey=c.SiteID</strong>
<strong>inner join folders f on f.ContainerNodeID=fm.ContainerNodeID</strong>