The documentation for the New-UnifiedGroup cmdlet (which creates a new Office 365 Group) says that:
“You can specify multiple owners separated by commas.“
In other words, you should be able to say:
New-UnifiedGroup -Alias MyGroup -DisplayName "My Group" -Owner "Tony@Office365itpros.com", "Paul@Office365itpros.com"
But you can’t. PowerShell responds with:
Cannot process argument transformation on parameter ‘Owner’. Cannot convert the “System.Collections.ArrayList” value of type “System.Collections.ArrayList” to type “Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter”.
+ CategoryInfo : InvalidData: (:) [New-UnifiedGroup], ParameterBindin…mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,New-UnifiedGroup
+ PSComputerName : outlook.office365.com
Which is all very nice. It seems like the documentation assumed that the ability of the cmdlet to process multiple members when it creates a new group extended to owners.
Fortunately, there’s a simple workaround. Go ahead and create the new group with New-UnifiedGroup and then add as many owners as you want with Add-UnifiedGroupLinks. Just make sure that the people you add as owners are first added as members because a group owner has to be a member before they can become an owner. So the commands are something like this:
Add-UnifiedGroupLinks -Identity MyGroup -LinkType Member -Links "Paul@Office365itpros.com"
Add-UnifiedGroupLinks -Identity MyGroup -LinkType Owner -Links "Paul@Office365itpros.com"
Remember too that the link you pass must be something that Exchange Online can resolve. This can be a mailbox alias, primary SMTP address, display name, or even distinguished name.
For more information about using PowerShell to manage Office 365 Groups, see Chapter 14 of Office 365 for IT Pros.