Export OU with same hierarchy and number of GPO attached to it RRS feed

  • Question

  • Guys, 

    i have been struggling to find script to export the AD OU's in hierarchical way with number of GPO attached to it. there are couple of scripts available to dump the OU;s in excel sheet but wont help

    Thanks for you help in advance 

    Satpal Kataria

    • Moved by Bill_Stewart Wednesday, September 13, 2017 9:52 PM Unanswerable drive-by question
    Friday, August 4, 2017 10:20 PM

All replies

  • What have you tried?  We won't write this for you.

    You will have to learn how to extract the GP references from the container object.

    This gets all OUs and the linked GPOs. You will have to resolve the links and create custom objects to gain a workable base.

    Get-ADOrganizationalUnit -filter *  | select Name, LinkedGroupPolicyObjects


    Friday, August 4, 2017 10:29 PM