Welcome Forums General PowerShell Q&A Get-Aduser DistinguishedName

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

      Hello

       

      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.

      Thanks

    • #168937
      Participant
      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.