Set-QADGroup

Retrieve all groups in a domain or container that match the specified conditions.

Syntax
      Set-QADGroup [[-Identity] IdentityParameter] [-GroupType GroupType]
         [-GroupScope GroupScope] ADProperties  Advanced_Options
               [-DeserializeValues] [-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. 

   -GroupType   'Security' or 'Distribution' 

   -GroupScope  'Global' 'Universal' or 'DomainLocal' 

  ADProperties  Set one or more of the properties below:
 
                [-Description String] [-DisplayName String]
                [-SamAccountName String] [-Email String] [-Notes String] 

   -DeserializeValues
                Use if the input contains serialized attribute values
                (for instance, when importing a directory object from a text
                file that was created using -Serialize)

   -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:
  
                [-ObjectAttributes Object]  
                [-UseDefaultExcludedProperties]  
                [-UseDefaultExcludedPropertiesExcept String []] [-ExcludedProperties String[]]
                [-IncludedProperties String[]] [-UseGlobalCatalog] 
                [-Proxy] [-Service String]
                [-ConnectionAccount String] [-ConnectionPassword SecureString]
                [-Credential PSCredential] [-Connection ArsConnection]

Notes:
By default Set-QADGroup 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

Change the description of the 'Super Admins' group in domain ss64Dom

PS C:> Set-QADGroup 'ss64Dom\Super Admins' -description 'Level 1 Admin group'

Change the name of the group 'Accountants' by prefixing it with with 'GRP_' (so it becomes 'GRP_Accountants')

PS C:> Get-QADGroup Accountants | %{Set-QADGroup $_ -SamAccountName ("GRP_" + $_.SamAccountName)}

Change the SAM account name (pre windows 2000) given the distinguished name:

PS C:> set-QADGroup 'CN=TestGroup,OU=Groups,DC=ss64,DC=com' -samaccountname 'Demo Group'

“He travels the fastest who travels alone” ~ Rudyard Kipling

Related:

Get-QADGroup - Retrieve groups that match specific conditions
Quest cmdlets


© Copyright SS64.com 1999-2014
Some rights reserved