SCCM SQL Query Show Direct Members

SCCM SQL Query Show Direct Members om hierna vervolgens een Rapport van te maken.

SCCM 2007:
SQL statement:

SELECT coll.Name, crd.CollectionID, crd.rulename
FROM v_CollectionRuleDirect crd
INNER JOIN v_Collection coll on crd.collectionID=coll.collectionID

SCCM CB:
SQL statement:

SELECT coll.Name, coll.CollectionID, fcfm.Name
FROM SMS_Collection coll, SMS_FullCollectionMembership fcfm
WHERE coll.CollectionID = fcfm.CollectionID AND fcfm.IsDirect = 1