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

    Server 2012 PS: Script to find OU path

    IT Discussion
    server2012 server 2012 aduc active directory domain ou path
    4
    6
    581
    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.
    • gjacobse
      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

      dbeato 1 Reply Last reply Reply Quote 3
      • coliver
        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
        • dbeato
          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?

          scottalanmiller 2 Replies Last reply Reply Quote 0
          • scottalanmiller
            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
            • scottalanmiller
              scottalanmiller @dbeato last edited by

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

              dbeato 1 Reply Last reply Reply Quote 0
              • dbeato
                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
                • First post
                  Last post