Remove-QADGroupMember

Remove members from a group in Active Directory.

Syntax
      Remove-QADGroupMember [-Identity] IdentityParameter [-Member IdentityParameter]  
         Advanced_Options [-WhatIf] [-Confirm]
  
Key

   -identity    The Distinguished Name (DN), Canonical Name, GUID or, where applicable,
                the Domain\Name, UPN or SID of the object you wish to find. 

   -WhatIf      Describe what would happen if you executed the command,
                without actually executing the command.

   -Confirm     Prompt for confirmation before executing the command.

Advanced_Options:
                [-Proxy] [-Service String] [-UseGlobalCatalog] 
                [-ConnectionAccount String] [-ConnectionPassword SecureString]
                [-Credential PSCredential] [-Connection ArsConnection]

Notes:
By default Remove-QADGroupMember will connect to any available domain controller with the credentials of the locally logged on user, to connect to a specific domain controller using a specific account, either use the advanced options (-Proxy/-Service/-ConnectionAccount) or use the Connect-QADService cmdlet to make the connection.

Examples

Remove the users LiamJ and SueA from the group group64:

PS C:> remove-QADGroupMember 'CN=group64,OU=demoOU,DC=ss64,DC=com' -member 'ss64Dom\LiamJ','ss64Dom\SueA'

“Plans are being discussed as to who will replace Dick Cheney if he has to resign for health reasons. It's not easy for President Bush, he can't just name a replacement. He would first have to be confirmed by the oil, gas and power companies” ~ Jay Leno

Related:

Get-QADGroupMember - Retrieve members of a group
Syntax - Wildcards


© Copyright SS64.com 1999-2013
Some rights reserved