Forum Discussion
How to create O365 Groups in Powershell from a csv file
- Oct 29, 2018
The reason for the failure is PowerShell treating the value in that column as string, and not a list. You should be able to do it like this:
Add-UnifiedGroupLinks groupname -LinkType Member -Links $_.Members.Split(",")
You can adapt the example for the New-UnifiedGroup cmdlets as well, it's simply easier to test with the Add-UnifiedGroupLinks one.
The reason for the failure is PowerShell treating the value in that column as string, and not a list. You should be able to do it like this:
Add-UnifiedGroupLinks groupname -LinkType Member -Links $_.Members.Split(",")
You can adapt the example for the New-UnifiedGroup cmdlets as well, it's simply easier to test with the Add-UnifiedGroupLinks one.
Hello,
It works perfectly.
I tried to adapt my own script and with just a -split when declaring my variables, it works as well.
Thank you very much, you helped me greatly.
Vincent