Using Powershell to convert AD security group from Global to Universal per OU ?


Before I Join my AD domain to bigger AD forest, I need to convert existing 700+ AD security group which is configured as Global to Universal, so the member of this AD security group can be from any domains in the same AD forest.

How can I convert the AD security group per OU basis using the Pwoershell without losing the existing group member or its description & SID number ?

Thanks in advance.
Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?
yo_beeConnect With a Mentor Director of Information TechnologyCommented:
Try this
you need to have AD Powershell installed on your computer and import the module and run this
Import-Module activedirectory
get-adgroup -filter *  -SearchBase 'OU=Test_OU,DC=xxx,DC=xxxx' -SearchScope Subtree | ?{$_.GroupScope -eq 'Global'} | Set-ADGroup -GroupScope Universal

Open in new window

Senior IT System EngineerIT ProfessionalAuthor Commented:
Ok, does it going to convert the AD security group in one OU and its sub-OU as well ?

Or just the OU defined?
yo_beeDirector of Information TechnologyCommented:
change the subtree to OneLevel
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.