PowerShell Export Collection Members to CSV SCCM ConfigMgr

I was at a client’s yesterday and wanted to “True Up” SCCM/ConfigMgr’s Collection memberships compared to a spread sheet they had of their servers. Now I’m not an Excel wizard by any stretch of the Imagination! So the client said “Can you get me a CSV with the server names listed”.

The next thing that happened is bellow! It’s really quite a simple script when you think about it. As always comments throughout the script explain what is happening.

Anyway here it is:

4 Replies to “PowerShell Export Collection Members to CSV SCCM ConfigMgr”

  1. hello,

    Thanks for the script.
    I ran the script, but i couldn’t get the results.
    when I run the script , its asking for collection ID, which I gave and then it stops at

    #Set delimiter for CSV
    $delimiter = ‘,’

    then what values we have to input in?


Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.