I have found that the following windows command will add a user to a group in AD:
dsquery user -samid <logonname>|dsmod group "CN=<groupname>,CN=Builtin,DC=<domainprefix>,DC=<domainsuffix>" -addmbr
My question is how can I package this into some sort of script to take the logon names (samid) of many users a run them through this so that they are each added to my group?
- Edited by S6D4G6 11 hours 43 minutes ago