Extract members from AD groups in a txt file

Welcome Forums General PowerShell Q&A Extract members from AD groups in a txt file

Viewing 3 reply threads
  • Author
    Posts
    • #207129
      Participant
      Topics: 2
      Replies: 1
      Points: 24
      Rank: Member

      Extracting members doesnt work if members are from different domains

      • This topic was modified 3 months ago by kvprasoon. Reason: code formatting
      • This topic was modified 2 months, 4 weeks ago by Shaneyong09.
    • #207291
      Senior Moderator
      Topics: 8
      Replies: 1215
      Points: 4,335
      Helping Hand
      Rank: Community Hero

      Are you getting any error ? if not what is the output against the accounts in other domain ?

    • #207405
      Participant
      Topics: 2
      Replies: 1
      Points: 24
      Rank: Member

      Thanks for the response. There’s no error. Basically, there are some members (e.g. NA/patrick, SA/Antonio) inside the Global Group AP/Sales_Container.GG. Even though there are also AP members inside the group, the output .csv did not display the results from that group. However, there’s no problem in displaying the results if all the members are in the AP domain

    • #207408
      Participant
      Topics: 6
      Replies: 93
      Points: 428
      Helping Hand
      Rank: Contributor

      And the underlying trusts for all your domains is proper? Maybe the other Domains dont trust AP, but AP trusts them?

      And I trust (pun intended :)) you are aware of $ENV:LogonServer which is the DC you authenticate to? It would be interesting to see what happens if you also change this in your loop to the selected domain.

Viewing 3 reply threads
  • The topic ‘Extract members from AD groups in a txt file’ is closed to new replies.