PowerShell Connection on Different Domain

Copper Contributor

Hi Guys,


I need help with the script to remove Multiple Users from a Group on Different Domain using PowerShell. We have two domains however, my machine is on another domain. How can i leverage PowerShell Script to remove bulk users in a Group on a different domain.


Thanks in Advance.

1 Reply
you can remove the users with the Remove-ADGroupMember command with -Server parameter.
Remove-ADGroupMember -Identity "myGroup" -Members JohnDoe,JaneDoe -Server DC1.2ndDomain