none
Add Users from Trustet Domain RRS feed

  • Question

  • Hello,

    We have two Domains with a trust between them.

    Now we want to copy users from one AD-Group to another:

    Get-ADGroupMember Group1 | Select sAMAccountName | ForEach { Add-ADGroupMember Group2 -Members $_.sAMAccountName }

    Some Users can't be added, because it is a group that contains users from both domains.
    My question is, how do I need to change the code, to copy users from the domain1 AND the trusted domain2 into a group inside domain1?

    Thank you for helping.

    Wednesday, February 12, 2020 3:28 PM

All replies

  • You have to use distinguished name or the user objects:

    Read the help for the CmdLets before trying to use them.


    \_(ツ)_/

    Wednesday, February 12, 2020 6:01 PM