locked
Report to list all computers and their collection membership RRS feed

  • Question

  • Hi

    I am currently working on a site where direct membership is used for collections but a need has arisen to move to AD Queries.

    I have created a simple powershell script that creates groups based on the contents of a csv file and another script which populates this with the members listed in another csv file.

    To help speed up the process is there a way to generate a report that lists ALL Computers and their Collection membership?

    The only reports I seem to find that are built in require an inputted value of either computer name of collection ID. I simply need a report that lists Computer Name is column 1 and Collection Name in column 2 for all computers and all collections.

    Many Thanks,

    Matt Thorley

    Wednesday, May 28, 2014 11:04 AM

Answers

  • Just a thought... but I think what Matt really wants to know is "how many direct membership things are there still out there to clean up".  Try this...

    select c.Name as 'Collection Name', 
    c.CollectionID,
    crd.RuleName, 
    s.Netbios_Name0
    from v_CollectionRuleDirect crd
    join v_Collection c on c.CollectionID=crd.CollectionID
    join v_R_System s on s.ResourceID=crd.ResourceID
    order by c.Name, s.Netbios_Name0


    Standardize. Simplify. Automate.

    Thursday, May 29, 2014 1:19 AM

All replies

  • select 
    FCM.Name,
    C.Name
    from 
    dbo.v_Collection C
    join dbo.v_FullCollectionMembership FCM on C.CollectionID = FCM.CollectionID

    Thanks to Garth for original query. I just modified it :)


    Anoop C Nair (My Blog www.AnoopCNair.com) - Twitter @anoopmannur - FaceBook Forum For SCCM

    Wednesday, May 28, 2014 11:45 AM
  • Just a thought... but I think what Matt really wants to know is "how many direct membership things are there still out there to clean up".  Try this...

    select c.Name as 'Collection Name', 
    c.CollectionID,
    crd.RuleName, 
    s.Netbios_Name0
    from v_CollectionRuleDirect crd
    join v_Collection c on c.CollectionID=crd.CollectionID
    join v_R_System s on s.ResourceID=crd.ResourceID
    order by c.Name, s.Netbios_Name0


    Standardize. Simplify. Automate.

    Thursday, May 29, 2014 1:19 AM