Link to home
Start Free TrialLog in
Avatar of suriyaehnop
suriyaehnopFlag for Malaysia

asked on

Exchange Management Shell

I would like to have a cmdlet which can remove the user from distributions list which he member of.

Let say, this userA is member of distri1,distri2,distri3...etct
Avatar of shajidali
shajidali
Flag of United States of America image

This is the script for listing the groups the user belong to

http://myitforum.com/cs2/blogs/yli628/archive/2007/08/27/powershell-script-to-list-user-group-membership-in-active-directory.aspx 

Output of this pass it to Remove-DistributionGroupMember -Identity Groupnamefromabove  -Member 'DisplayNameofUser' or if you can pipe the output then Remove-DistributionGroupMember  -Member 'DisplayNameofUser'
Avatar of suriyaehnop

ASKER

Thank,

Is there any cmdlet in Exchange Management Shell that can query this
You can use remove-distributiongroupmember

Remove-DistributionGroupMember -Identity "GROUPNAME" -Member "USER"
ASKER CERTIFIED SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial