Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.E2010
$z = @()
$x = Get-MailboxDatabase | Where {$_.MasterType -eq "DatabaseAvailabilityGroup"}
ForEach ($d in $x)
{
$c = Get-mailbox -Database $d -ResultSize unlimited
$s = Get-MailboxDatabase $d -Status
$object = New-Object -TypeName PSObject
$object | Add-Member NoteProperty –Name Database –Value $d.Name
$object | Add-Member NoteProperty –Name Count –Value $c.count
$object | Add-Member NoteProperty –Name DatabaseSize –Value $s.DatabaseSize
$object | Add-Member NoteProperty –Name AvailableNewMailboxSpace –Value $s.AvailableNewMailboxSpace
#$object | Add-Member NoteProperty –Name Server –Value $d.Server
$z += $object
}
$z
$z = @()
$x = Get-MailboxDatabase | Where {$_.MasterType -eq "DatabaseAvailabilityGroup"}
ForEach ($d in $x)
{
$c = Get-mailbox -Database $d -ResultSize unlimited
$s = Get-MailboxDatabase $d -Status
$object = New-Object -TypeName PSObject
$object | Add-Member NoteProperty –Name Database –Value $d.Name
$object | Add-Member NoteProperty –Name Count –Value $c.count
$object | Add-Member NoteProperty –Name DatabaseSize –Value $s.DatabaseSize
$object | Add-Member NoteProperty –Name AvailableNewMailboxSpace –Value $s.AvailableNewMailboxSpace
#$object | Add-Member NoteProperty –Name Server –Value $d.Server
$z += $object
}
$z
No comments:
Post a Comment