PowerAddict.net

powerAddict.NET

by Lou Goban
IT Application Professional at Syntax

How to create security group with multiple owners in PowerShell

$OwnersBinding = @{
    "[email protected]" = @(
        "https://graph.microsoft.com/v1.0/users/<User Object ID>",
        "https://graph.microsoft.com/v1.0/users/<User Object ID>"
        )
}

New-MgGroup -DisplayName "<DisplayName>" -MailEnabled:$False  -MailNickName "<MailNickName>" -SecurityEnabled -AdditionalProperties $OwnersBinding

Leave the first comment