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 10 months, 4 weeks ago by kvprasoon. Reason: code formatting
      • This topic was modified 10 months, 3 weeks ago by Shaneyong09.
    • #207291
      Senior Moderator
      Topics: 9
      Replies: 1449
      Points: 5,429
      Helping Hand
      Rank: Community MVP

      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: 10
      Replies: 204
      Points: 1,001
      Helping Hand
      Rank: Community Hero

      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.