ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Server 2012 PS: Script to find OU path

    IT Discussion
    server2012 server 2012 aduc active directory domain ou path
    4
    6
    964
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by gjacobse

      Needed to find the OU path for a user,.. Happened to find this useful.

      PS C:\Windows\system32> dsquery user -name ntg*
      "CN=UserName,OU=Users,OU=OUGroup,DC=DCserver,DC=com"
      

      updated title

      dbeatoD 1 Reply Last reply Reply Quote 3
      • coliverC
        coliver
        last edited by coliver

        You could also do something like this in powershell:

        (Get-ADUser -Identity username -Properties *).CanonicalName

        1 Reply Last reply Reply Quote 1
        • dbeatoD
          dbeato @gjacobse
          last edited by

          @gjacobse said in Server 2012 PS: Script to find OU path:

          Needed to find the OU path for a user,.. Happened to find this useful.

          PS C:\Windows\system32> dsquery user -name ntg*
          "CN=UserName,OU=Users,OU=OUGroup,DC=DCserver,DC=com"
          

          updated title

          Are you using AD for NTG?

          scottalanmillerS 2 Replies Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @dbeato
            last edited by

            @dbeato said in Server 2012 PS: Script to find OU path:

            Are you using AD for NTG?

            No, NTG doesn't have AD or even Windows.

            1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller @dbeato
              last edited by

              @dbeato he's looking for NTG admin accounts on someone else's domain.

              dbeatoD 1 Reply Last reply Reply Quote 0
              • dbeatoD
                dbeato @scottalanmiller
                last edited by

                @scottalanmiller said in Server 2012 PS: Script to find OU path:

                @dbeato he's looking for NTG admin accounts on someone else's domain.

                Good!

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post