Script to Determine Members of a Group

I needed to find a way to list the members of a group. Thankfully I blogged about the first issue in February because that led me to the solution. I'm actually using the same DSGET command but instead of using the user command I'm using the group command.

DSGET GROUP CN=West_Coast_Sales,OU=Sales,OU=GROUPS,DC=adminprep,DC=com -MEMBERS –EXPAND


Output Like this,

"CN=bmiller,OU=Sales,DC=adminprep,DC=com "
"CN=jsmith,OU=Sales,DC=adminprep,DC=com "
"CN=dregan,OU=Sales,DC=adminprep,DC=com "
"CN=lramero,OU=Sales,DC=adminprep,DC=com "
"CN=cpeters,OU=Sales,DC=adminprep,DC=com "
"CN=jhorton,OU=Sales,DC=adminprep,DC=com "

Hopefully this solution works for you too.

Share this

Related Posts

Previous
Next Post »

What do you think about this Article? Add your Opinion..! EmoticonEmoticon