Les actions personnalisées ne sont pas disponibles dans la solution Essentials.
Si vous cherchez le propriétaire d’un groupe Microsoft 365, vous pouvez utiliser le script suivant :
En PowerShell :
# Connexion à Exchange Online
Connect-ExchangeOnline -Credential (Get-Credential) -ShowBanner:$False
# Obtenir les propriétaires d’un groupe Office 365
Get-UnifiedGroup -Identity "Purchase@Crescent.com" | Get-UnifiedGroupLinks -LinkType Owner | Select DisplayName, PrimarySmtpAddress
# Déconnexion Exchange Online
Disconnect-ExchangeOnline -Confirm:$False
Dans une action personnalisée CoreView :
{
"id": "68f88c15-937c-4129-98b2-4ff3285e4955",
"title": "Get M365 group Owner",
"lastModified": "2021-11-11T12:17:41.1850000Z",
"target": "O365Group",
"tags": [],
"vars": [],
"params": [
{
"name": "Name",
"type": "string",
"isDefault": true
}
],
"columns": {
"Name": ""
},
"version": 5,
"statement": "param ([string]$Name)\r\n\r\n$Manager = Get-UnifiedGroup $Name | select PrimarySmtpAddress, @{n= \"ManagedBy\"; e={$_.ManagedBy | foreach {(Get-Mailbox $_).PrimarySMTPAddress}}}\n$M365GroupOwner = $Manager.ManagedBy\n\n$json = @\"\n{\n\"OwnerEmailAddress\": \"$M365GroupOwner\"\n}\n\"@ \nreturn $json"
}