SCCM query all collections associated with a device

There are a few ways we can find the list of SCCM collections associated with a specific device.

  • Open SCCM console, search for the device and select tab COLLECTIONS. Its under Assets –> Devices –> search for the device.
  • Run the following SQL query
 SELECT 
    V_Collection.name AS CollectionName,
    V_Clientcollectionmembers.name AS ClientName
FROM 
    V_Collection
    INNER JOIN V_Clientcollectionmembers ON V_Collection.CollectionID = V_Clientcollectionmembers.CollectionID
WHERE 
    V_Clientcollectionmembers.name = 'CL035'
	order by 1 
  • Use the following PS command to query
$deviceName = 'CL035'
$collections = Get-CMDeviceCollectionMembership -DeviceName $deviceName
$collections | Select-Object CollectionName

Leave a Reply

Your email address will not be published. Required fields are marked *