Hello
I have been trying to add users to groups from a CSV for hours now using add-adgroupmember. I always get the error-
"Add-ADGroupMember : Cannot validate argument on parameter 'Identity'. The argument is null. Provide a valid value for the argument, and then try running the commandagain."
Here is the script I am using and the CSV it reads from -
Text
import-module ActiveDirectory import-csv y:\d1.csv-Delimiter ";" | Foreach-Object {add-adgroupmember -Identity $_.group -Members $_.name} Text
group;name "CN=example,OU=example,DC=example,DC=example,DC=example";"CN=example,OU=example,OU=example,DC=example,DC=example,DC=example" I have 2000 users to add to around 100 groups, maybe there is a better way? Is there something simple I am missing here?