Forum Discussion
Test SharePoint
Oct 12, 2019Brass Contributor
Trying to add multiple users to distribution group and getting error: Cannot validate argument
I am trying to add multiple users in a distribution Group. All users are in cloud. I have a CSV which has the following columns : DisplayName, Alias, PrimarySmtpAddress I am trying the followi...
- Oct 12, 2019
Test SharePointThen either your csv file is malformed, or you need to modify the Import-Csv parameters.
DanielNiccoli
Oct 12, 2019Steel Contributor
Test SharePointSomething breaks during import. "Cannot validate argument on parameter 'Member'. The argument is null." Null means that it couldn't parse the csv, otherwise it would be an empty string.
Have you confirmed that the import actually works?
$Userslist = Import-CSV c:\users\user\ab.csv
$Userlist
$Userlist[0]
Test SharePoint
Oct 12, 2019Brass Contributor
DanielNiccoli : thanks for your reply. I tried the above command and get this:
Cannot index into a null array.
At line:1 char:1
+ $Userlist[0]
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
- DanielNiccoliOct 12, 2019Steel Contributor
Test SharePointThen either your csv file is malformed, or you need to modify the Import-Csv parameters.
- mike36usmcJun 20, 2024Copper Contributor
DanielNiccoli i fixed the issue,
I had to put the actual name of what the -member $_email for example so in the excel sheet had to insert line that said email in line 1 and all the email addresses underneath that and it work imported 67 members at once to the distro group
- Test SharePointOct 15, 2019Brass Contributor
- jimbarrgpbostonJan 18, 2021Brass Contributor
Some info on exactly what you did would be helpful. I've wasted over an hour on this and I'm ready to just add the 114 people via the web interface, given there is no definitive way to validate any error message in Powershell. Test SharePoint