count all mailboxes of owa, imap, pop3 and mapi

 

 

Get-CasMailbox -ResultSize Unlimited | ForEach-Object {
if ($_.ActiveSyncEnabled) { $ActiveSync++ }
if ($_.OWAEnabled) { $OWA++ }
if ($_.POPEnabled) { $POP++ }
if ($_.ImapEnabled) { $Imap++ }
if ($_.MapiEnabled) { $Mapi++ }
}

$Count = New-Object psobject
$Count | Add-Member -Name ActiveSyncEnabled -Type NoteProperty -value $ActiveSync
$Count | Add-Member -Name OWAEnabled -Type NoteProperty -value $OWA
$Count | Add-Member -Name POPEnabled -Type NoteProperty -value $POP
$Count | Add-Member -Name ImapEnabled -Type NoteProperty -value $Imap
$Count | Add-Member -Name MapiEnabled -Type NoteProperty -value $Mapi
$Count | ft

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.