How to Assign Multiple Group Owners Using the New-UnifiedGroup Cmdlet

PowerShell error when New-UnifiedGroup runs

The documentation for the New-UnifiedGroup cmdlet (which creates a new Microsoft 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.

The WorkAround

Fortunately, two simple workaround exist. First, you can add multiple owners by specifying them in the ManagedBy parameters. In this example

New-UnifiedGroup -Alias "Banking.Ivestigations" -DisplayName "Banking Investigations" -Owner Tony.Redmond -ManagedBy Jessica.Chen, Tony.Redmond

You can see that I have specified both the Owner and ManagedBy parameter. If you don’t pass a value in Owner, Exchange Online sets the signed in user as a group owner along with the people specified in ManagedBy. In other words, make sure you use the right combination of parameters to add the people you want to be group owners.

The second method is to 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.

3 Replies to “How to Assign Multiple Group Owners Using the New-UnifiedGroup Cmdlet”

Leave a Reply

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