none
Get-AdOrganizationalUnit

    Question

  • I just creating a home lab with a single Server 2016 at the moment.  I promoted the server to a Domain Controller.  When I run Get-AdOrganizationalUnit -Filter * the only OU it returns is the Domain Controllers OU.  In my work production environment, the same command returns all of the OUs in the organization.  Any idea why it only returns the Domain Controller OU in my home lab?
    Wednesday, February 8, 2017 1:06 AM

Answers

  • Most likely because you have not yet created any OU's. The Domain Controllers OU is created when you create the domain.

    Richard Mueller - MVP Enterprise Mobility (Identity and Access)


    • Proposed as answer by Todd Heron Wednesday, February 8, 2017 3:43 AM
    • Marked as answer by metallicvett Wednesday, February 8, 2017 4:44 PM
    • Edited by Richard MuellerMVP Thursday, February 9, 2017 9:32 AM typo
    Wednesday, February 8, 2017 3:07 AM

All replies

  • Most likely because you have not yet created any OU's. The Domain Controllers OU is created when you create the domain.

    Richard Mueller - MVP Enterprise Mobility (Identity and Access)


    • Proposed as answer by Todd Heron Wednesday, February 8, 2017 3:43 AM
    • Marked as answer by metallicvett Wednesday, February 8, 2017 4:44 PM
    • Edited by Richard MuellerMVP Thursday, February 9, 2017 9:32 AM typo
    Wednesday, February 8, 2017 3:07 AM
  • Ok.  I see.  It hadn't crossed my mind that the built in containers weren't OUs.  I did a Get-AdObject -Filter * and see by the object class that "Computers" and "Users" are not OUs.
    • Edited by metallicvett Wednesday, February 8, 2017 4:50 PM
    Wednesday, February 8, 2017 4:44 PM
  • > Why doesn't it return the built in OUs?
     
    These are not OUs, but containers - take a close look on the different folder icons :-)
     
    Wednesday, February 8, 2017 4:53 PM