We have a body of users that we'd like to remove from the "Domain Users" group. Using the script below, I get the this result:
The user cannot be removed from a group because the group is currently the user's primary group.
I was thinking about creating a group and adding all the users under the "DealerPack Customers" OU to that group and, somehow, making it primary. Then go back a run this script against those users to delete them out of Doamin Users. Is this scenario possible?
dsquery user "OU=DealerPack Customers,OU=Trading Partners,OU=HNIC Users,OU=rmbu,DC=ofcwic,DC=com" -samid * -limit 0 | dsmod group "CN=Domain Users,CN=Users,DC=ofcwic,DC=com" -rmmbr