Wildcard character for "All objects in an OU"

Exists?
It's quite tiring beating each time all the User Accounts when creating a new Group. Would be appreciate even a workaround.
TY
It's quite tiring beating each time all the User Accounts when creating a new Group. Would be appreciate even a workaround.
TY
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□
You're just trying to add all the users of an OU to a group? -
rjbarlow Member Posts: 411
You're just trying to add all the users of an OU to a group? -
royal Member Posts: 3,352 ■■■■□□□□□□
1. Install PowerShell
2. Install the QAD Snapin by reading the following: Shariq Sheikh | Port 389 Blog Archive Put Powershell and QAD cmdlets together to become a lazier (yet smarter) System Admin
3. Obtain the Distinguished Name for the OU
4. Obtain the Distinguished Name for the Group
5. Run the following script: Get-QADUser -SearchRoot "DN of OU" | foreach-object { Add-QADGroupMember -identity "DN of Group" -member $_ }
Example -
DN of the OU: OU=Lab,OU=Root,DC=shudnow,DC=net
DN of the Group: CN=LabGroup,OU=Root,DC=shudnow,DC=net
The command would appear as:
Get-QADUser -SearchRoot "OU=Lab,OU=Root,DC=shudnow,DC=net" | foreach-object { Add-QADGroupMember -identity "CN=LabGroup,OU=Root,DC=shudnow,DC=net" -member $_ }
You can obtain the DN using ADSIEdit or LDP.“For success, attitude is equally as important as ability.” - Harry F. Banks -
rjbarlow Member Posts: 411
I'll try this solution (not very soon though), but if works you're a devil Royal. -
royal Member Posts: 3,352 ■■■■□□□□□□
I'll try this solution (not very soon though), but if works you're a devil Royal.
After I wrote the cmdlet, I tested it in my lab to see if it would work and low and behold, it did.“For success, attitude is equally as important as ability.” - Harry F. Banks -
rjbarlow Member Posts: 411
After I wrote the cmdlet, I tested it in my lab to see if it would work and low and behold, it did.