SQL Query to See What Collections a Workstation Belongs To

SQL Query to See What Collections a Workstation Belongs To
networkchic's picture

This query is very helpful in trying to determine what collections a machine belongs to without having to go through Resource Manager.

SELECT   vComputer.Name, vComputer.[User], vComputer.[OS Name], vComputer.[OS Version], vComputer.[IP Address], 
           CollectionIncludeResource.CollectionGuid, vCollection.Name AS 'Collection', vCollection.Description
FROM     CollectionIncludeResource INNER JOIN
           vComputer ON CollectionIncludeResource.ResourceGuid = vComputer.Guid INNER JOIN
           vCollection ON CollectionIncludeResource.CollectionGuid = vCollection.Guid
           
3.17647
Average: 3.2 (17 votes)