Forum Discussion
Trying to add multiple users to distribution group and getting error: Cannot validate argument
- Oct 12, 2019
Test SharePointThen either your csv file is malformed, or you need to modify the Import-Csv parameters.
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
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
- DanielNiccoliFeb 02, 2021Iron ContributorError messages in PowerShell are mostly straight forward. He also said exactly what he did: create a valid csv file to use for the import.