New-UnifiedGroup and Multiple Owners

PowerShell error when New-UnifiedGroup runs

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 "", ""

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 :

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.

The WorkAround

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 ""
Add-UnifiedGroupLinks -Identity MyGroup -LinkType Owner -Links ""

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.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.