OpsMgr 2007 Powershell – list group members

Sometimes I like posting things that I utilize at work just so I can find them easier, or refer forums posters to it. This is one of those posts. I needed to dump the group membership into a file. Line 1 loads the group information into an array. Line 2 gets the specified group information. Line 3 uses a function to return all group members and loads that information into an array. Line 4 formats the array and dumps only the display name into a file.

Nice!! I have been trying to get this for ages. I guess i have been searching in the wrong place 🙂 Saves me having to pull this out from SQL, and can now add it to a master PS script that pulls out other agent data