Export (0) Print
Expand All

Group Membership Removal

Updated: February 28, 2009

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to remove all group memberships from a user.

The following example demonstrates how to remove all group memberships from the user SaraDavis:

Get-ADPrincipalGroupMembership -Identity SaraDavis | % {Remove-ADPrincipalGroupMembership -Identity SaraDavis -MemberOf $_}

For a full explanation of the parameters that you can pass to Get-ADPrincipalGroupMembership or Remove-ADPrincipalGroupMembership, at the Active Directory module command prompt, type Get-Help Get-ADPrincipalGroupMembership –detailed or Get-Help Remove-ADPrincipalGroupMembership –detailed, and then press ENTER.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft