Ecco come fare:
$Totale=0;(get-mailbox)| where-object {$_.LinkedMasterAccount -ne "NT AUTHORITY\SELF"}| select-object -property @{Name="Utente";Expression={$_.Name}},@{Name="GB";Expression = {"{0:N2}" -f ((get-mailbox $_.Alias|Get-MailboxStatistics).Totalitemsize.value.tomb()/1024)}},@{Name="Limite";Expression={$_.ProhibitSendReceiveQuota}} | sort-object GB -Descending;(get-mailbox)| % { $Totale+=((get-mailbox $_.Alias|Get-MailboxStatistics).Totalitemsize.value.tomb()/1024)};write-host ;write-host "Totale cassette (in GB):"([math]::Round($Totale))
Questo il risultato:
Utente GB Limite ------ -- ------ Valerio 9,52 12GB Antonio 5,41 6GB Leonardo 4,92 6GB Emanuele 3,52 5GB Salvatore 2,59 8GB Totale cassette (in GB): 25,96
Devi effettuare l'accesso per postare un commento.