adding multiple groups from User to a different User

Welcome Forums General PowerShell Q&A adding multiple groups from User to a different User

Viewing 2 reply threads
  • Author
    Posts
    • #265331
      Participant
      Topics: 139
      Replies: 287
      Points: 460
      Rank: Contributor

      I pulled a list of groups from one user and wanted to pipe them into another user

    • #265436
      Participant
      Topics: 2
      Replies: 382
      Points: 523
      Helping Hand
      Rank: Major Contributor

      I’m guessing there’s a question 🙂

      You’ll need to use Select-Object -ExpandProperty MemberOf when building the list of groups. 

      Also, it’s not wise to filter on the displayName attribute.  This attribute has to be unique only within an OU, not within AD.

    • #265511
      Participant
      Topics: 139
      Replies: 287
      Points: 460
      Rank: Contributor

      I’m guessing there’s a question 🙂

      Ah! thanks for reading my mind as well as answering my question. I knew better about -expandProperty

Viewing 2 reply threads
  • You must be logged in to reply to this topic.