Last active
August 23, 2016 10:46
-
-
Save chrisbrownie/dba35047a896e656a7d3 to your computer and use it in GitHub Desktop.
Bulk Convert AD Groups to Global
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all the groups in the OU we're targeting | |
$groups = Get-ADGroup –Filter * -SearchBase “OU=File Shares,OU=Groups,DC=Contoso,DC=com” | |
# Recurse through each group | |
Foreach ($group in $groups) { | |
# Make it universal | |
$group | Set-ADGroup –GroupScope 2 | |
# Make it global | |
$group | Set-ADGroup –GroupScope 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment