1) installo il modulo ExchangeOnlineManagement tramite il sito psgallery, se necessario
(https://www.powershellgallery.com/)
2) Apro PowerShell e importo il modulo di gestione Exchange Online
Code: Select all
Import-Module ExchangeOnlineManagement
Code: Select all
Connect-ExchangeOnline -UserPrincipalName myuseradmin@mydomainfake.com
Code: Select all
Get-Recipient -ResultSize Unlimited |
Select-Object DisplayName,RecipientType, PrimarySmtpAddress, @{Name="AliasSmtpAddresses";Expression={($_.EmailAddresses | Where-Object {$_ -clike "smtp:*"} | ForEach-Object {$_ -replace "smtp:",""}) -join "," }} |
Export-Csv "C:\tmp\Email-Addresses.csv" -NoTypeInformation -Encoding UTF8
Get-RecipientPermission
oppure, se volete esportare il risultato in un file CSV:
Get-RecipientPermission|Export-CSV -Path c:\tmp\list.csv