Automate GPO Links from Source OU to Destination OU RRS feed

  • Question

  • Hi, I'm part of a rapidly growing company. There's probably 6-8 locations that need to be integrated into our AD environment this year.

    I'm looking to automate the linking of GPO's from a source OU to a destination OU with the sub OU's included.All of our OU's have identical structures:



    Each location has about 90 sub OU's, so manually linking GPO's at each location will take hours.

    I can automate source OU to destination OU at a 1:1 level, but the sub OU's are my issue. I've been researching/testing for more hours than I'd like to admit and still can't figure out how to make this work. 

    Ideally something like this would work, but it doesn't. Any ideas? 

     $SourceOU = 'OU=Corp,DC=Corp,DC=Contoso,DC=Com' 
        $TargetOU = 'OU=Corp-Test,DC=Corp,DC=Contoso,DC=Com' 
        Copy-GPOLinks -SourceOU $SourceOU -TargetOU $TargetOU -CopyMode Replace -Recurse

    Any ideas?

    Thanks you

    • Moved by Bill_Stewart Friday, July 27, 2018 7:51 PM Abandoned
    Thursday, May 10, 2018 9:36 PM

All replies