Add one or more objects to a group in Active Directory.
Syntax Add-QADGroupMember [-Identity] IdentityParameter [-Member] IdentityParameter [-Type String] [-SizeLimit Int32] [-LdapFilter String] ADProperties [-IncludeAllProperties] DateTimeOptions [-WhatIf] [-Confirm] Advanced_Options 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. -Member A list of objects to be added to the group. Each list entry is the DN, SID, GUID, UPN or Domain\Name of a directory object. Separate the list entries with commas. -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]
By default Add-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.
Add a list of members to the group group64:
PS C:> add-QADGroupMember -identity 'CN=group64,OU=demoOU,DC=ss64,DC=com' -member
“I hope someday you'll join us, and the world will be as one” - John Lennon (Imagine)
Get-QADGroup - Retrieve groups that match specific conditions