I’m using Sharepoint Online and I have a massive list of groups all in a CSV file. I dont have users for them yet but want to create the groups with a script. Is this possible if so how do i do it 🙂
I saw this article but it did not work.
http://3sharp.com/blog/use-powershell-to-automate-groups-and-users-provisioning-in-sharepoint-online/
Gave me the follwing error.
New-SPOSiteGroup : Cannot bind argument to parameter ‘Group’ because it is null.
At line:1 char:81
+ … sAndPermissions.csv | where {New-SPOSiteGroup -Group $_.Group -Permis …
+ ~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-SPOSiteGroup], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Online.SharePoint.PowerShell.Ne
wSPOSiteGroupNew-SPOSiteGroup : Cannot bind argument to parameter ‘Group’ because it is null.
At line:1 char:81
+ … sAndPermissions.csv | where {New-SPOSiteGroup -Group $_.Group -Permis …
+ ~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-SPOSiteGroup], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Online.SharePoint.PowerShell.Ne
wSPOSiteGroup
Sounds like your importing the csv incorrectly and no value is coming through when you are trying to create your group. I would check to make sure the CSV is being fed in correctly to your PowerShell Script by doing some logging.