Adding and Removing Members of a Group
Updated: February 28, 2009
Applies To: Windows Server 2008 R2
This topic explains how to use the Active Directory module for Windows PowerShell to add or remove members of a group.
The following example demonstrates how to add the user SaraDavis to the group SvcAccPSOGroup:
Add-ADGroupMember -Identity SvcAccPSOGroup -Member SaraDavis
The following example demonstrates how to remove the user SaraDavis from the group SvcAccPSOGroup:
Remove-ADGroupMember -Identity SvcAccPSOGroup -Member SaraDavis
For a full explanation of the parameters that you can pass to Add-ADGroupMember or Remove-ADGroupMember, at the Active Directory module command prompt, type Get-Help Add-ADGroupMember –detailed or Get-Help Remove-ADGroupMember –detailed, and then press ENTER.