My goal : how to remove membership of groups from a domain from people that are in an other domain ?
I have two domains AAA and BBB.
for this case i'm only using users from AAA : user@AAA
I have groups in both domains.
people from domain AAA are member of groups of domain BBB.
what would be the command in order to be able to delete groups of domain BBB for users in domain AAA.
So far my command is trying to look to user in domaine BBB even when i'm giving the UPN.
Remove-ADGroupMember -identity grp_bbb01 -Member user@AAA -server BBB -Confirm:$false
^ this is throwing an error : can not find an object with identity user@AAA under domain BBB , objectNotFound ....
how can i do this ?
thank you in advance.