Se este for um Grupo do Office 365, talvez você queira usar os commandlets * -unifiedgrouplinks.
#note to add an owner, they have to be a member first
Add-UnifiedGroupLinks -Identity [email protected] -LinkType Member -Links [email protected]
Add-UnifiedGroupLinks -Identity [email protected] -LinkType Owner -Links [email protected]
Remove-UnifiedGroupLinks -Identity [email protected] -LinkType Owner -Links [email protected]
Portanto, se eu quiser adicionar UPN1 @ contso.com, UPN2 @ contso.com, UPN3 @ contso.com como proprietário a [email protected], execute o seguinte em uma sessão do Powershell do Exchange Online
"[email protected]","[email protected]","[email protected]"|%{
Add-UnifiedGroupLinks -Identity [email protected] -LinkType Member -Links $_
Add-UnifiedGroupLinks -Identity [email protected] -LinkType Owner -Links $_
#If you want to subscribe them as well, uncomment this line
#Add-UnifiedGroupLinks -Identity [email protected] -LinkType subscriber -Links $_
}
Mais informações sobre esses commandlets podem ser encontradas aqui:
Remover-unifiedgrouplinks: link
Adicionar-UnifiedGroupLinks: link
Get-UnifiedGroupLinks: link