Avatar of Justin Tucker
Justin Tucker

asked on 

Powershell issue with Bulk adding users from csv.

Good Day,


Looking to get a bulk csv list of SamAccountName's added to a AD group was wondering if any one had any suggestions.  


Currently using this script:

Import-Module ActiveDirectory
$Users = Get-Content "C:\Users\******\Desktop\*******" | ForEach-Object {Add-ADGroupMember -Identity "GroupName" -Members $_.'User-Name'}

Open in new window


Getting error message "Add-ADGroupMember: Cannot validate argument on parameter 'Members'. The argument is Null or empty.


Can anyone assist with this?

PowershellActive Directory

Avatar of undefined
Last Comment
Jose Gabriel Ortega Castro

8/22/2022 - Mon