Quickly copy users from one group to another


If you ever need to quickly copy users from one AD group to another you can use this PowerShell script. It makes use of the Quest AD Commandlets which you can download for free. Simply change the source and target group on the first two lines of the script and run it in PowerShell.

$sourcegroup = “sourcegroup” $targetgroup = “targetgroup”
Get-QADGroupMember $sourcegroup | Add-QADGroupMember $targetgroup
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: