Powershell - Adding users to groups in another domain -
anyone know how add user group in domain trusted?
say im logged computer in domain apple , want add user (in domain orange) group "sg-california" in domain orange. how login other domain admin credentials run command:
add-adgroupmember -identity sg-california -members userindomainorange
you use -credential
parameter run command admin credentials. long ad trusts , set correctly, shouldn't have problem.
#get credentials $admincredentials = get-credential "domainorange\adminuser" #run ad command credentials add-adgroupmember -identity sg-california -members domainorange\userindomainorange -credential $admincredentials
Comments
Post a Comment