Albert Widjaja
asked on
Modifying PowerShell script to list the Exchange Server 2013 Mailbox Database white space ?
Hi All,
Can anyone here please assist me in modifying the PowerShell script that used to work for Exchange Server 2007 but no anymore in Exchange Server 2013 ?
I've tried this one but it doesn't work either: https://syscloudpro.com/2014/01/30/exchange-2007-database-white-space-report-2/
The script above was working to get the white space size within the mailbox database for all mounted database.
Thanks in advance.
Can anyone here please assist me in modifying the PowerShell script that used to work for Exchange Server 2007 but no anymore in Exchange Server 2013 ?
function Get-ExchangeWhiteSpace {
param(
$ComputerName = $(throw "ComputerName cannot be empty.")
)
# Convert Dates to WMI CIM dates
$tc = [System.Management.ManagementDateTimeconverter]
$Start =$tc::ToDmtfDateTime( (Get-Date).AddDays(-1).Date )
$End =$tc::ToDmtfDateTime( (Get-Date).Date)
# Create two claculated properties for InsertionStrings values
$DB = @{Name="DB";Expression={$_.InsertionStrings[1]}}
$FreeMB = @{Name="FreeMB";Expression={[int]$_.InsertionStrings[0]}}
Get-WMIObject Win32_NTLogEvent -ComputerName $ComputerName -Filter "LogFile='Application' AND EventCode=1221 AND TimeWritten>='$Start' AND TimeWritten<='$End'" | Select-Object ComputerName,$DB,$FreeMB | Sort-Object FreeMB –Unique –Descending
}
Get-ExchangeWhiteSpace -ComputerName "CCRClusteredMailboxName" | ft -AutoSize
I've tried this one but it doesn't work either: https://syscloudpro.com/2014/01/30/exchange-2007-database-white-space-report-2/
The script above was working to get the white space size within the mailbox database for all mounted database.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks !