Skip to content

Instantly share code, notes, and snippets.

@chrisbrownie
Last active August 23, 2016 10:46
Show Gist options
  • Save chrisbrownie/dba35047a896e656a7d3 to your computer and use it in GitHub Desktop.
Save chrisbrownie/dba35047a896e656a7d3 to your computer and use it in GitHub Desktop.
Bulk Convert AD Groups to Global
# 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