Connettersi tramite PowerShell a Office365:

  • $UserCredential = Get-Credential

  • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

  • Import-PSSession $Session

Comando da eseguire per visualizzare le informazioni che cerchiamo:

  • Get-MailboxStatistics "Stefano Marzorati" | Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount

Chudere la sessione:

  • Remove-PSSession $Session