Welcome Forums General PowerShell Q&A Get-Aduser DistinguishedName

Viewing 2 reply threads
  • Author
    • #168901
      Topics: 1
      Replies: 0
      Points: 16
      Rank: Member



      I have a file on my C drive I named  DistinguisheName.csv. The first column has the AD group name and is labeled “GroupName”. Second column is simply named “cn”. I need a script to give me the distinguished name for each of the groups in that sheet please.


    • #168937
      Topics: 2
      Replies: 1743
      Points: 3,579
      Helping Hand
      Rank: Community Hero

      What have you tried so far? Please show you code and expalin what’s not working as expected.

    • #169042
      Senior Moderator
      Topics: 8
      Replies: 1160
      Points: 4,055
      Helping Hand
      Rank: Community Hero

      @shawnb23 – This is of course doable. You need to use Import-Csv and Get-ADGroup cmdlet. I would suggest to read the help documentation for those cmdlets and start putting some lines of code based on what you understand. You can update this thread when you get stuck or get errors, folks here will help.

Viewing 2 reply threads
  • The topic ‘Get-Aduser DistinguishedName’ is closed to new replies.