Any c++ or java prog for calculating WhiteSpace in exchange 2010?

  • Thread starter Hariramprasath
  • Start date Views 1,146


Hi all..

I am doing a project on white space for my academic curriculum. In this am unable to calculate the amount of whitespace in Exchange Server 2010 as there is no 1221 event. So for till Exchange 2007 i have been using wmiquery to get the details about this event. Now my project is almost over, only this point make me unable to complete it fully.

Can anyone please help me in calculating the whitespace using any c++ or java codings?!

Thanks in advance;


Hi Michel,

Thank you very much for you reply.

Actually I am doing one academic project, for performing some actions in exchange Server. I have written all codes in c++ and using JNI i have finished everything. But only this Exchange Server 2010 WhiteSpace is not available in this wmiquery. I need to add codes in c++ or java to calculate this for my project. I am badly in need of this.. :(..



Does this help:

Function Get-DatabaseStatistics {
$Databases = Get-MailboxDatabase -Status
foreach($Database in $Databases) {
$DBSize = $Database.DatabaseSize
$MBCount = (Get-Mailbox -Database $Database.Name).Count
$MBAvg = $DBSize.ToBytes() / $MBCount
New-Object PSObject -Property @{
Server = $Database.Server.Name
DatabaseName = $Database.Name
LastFullBackup = $Database.LastFullBackup
MailboxCount = $MBCount
" DatabaseSize (GB)" = " {0:n2}" -f ($DBSize.ToBytes() / 1GB)
" AverageMailboxSize (MB)" = " {0:n2}" -f ($MBAvg / 1MB)
" WhiteSpace (MB)" = " {0:n2}" -f ($Database.AvailableNewMailboxSpace.ToBytes() / 1MB)

and you dump it it to csv with calls from PS.
>. c:\scripts\databasestatistics.ps1
>Get-DatabaseStatistics | Export-csv C:\Users\youdude\Desktop\report.csv -Force -NoType


Hi Mikey,

It worked!!. Really thanks a lot for the reply. :).

Is there any way to handle this everything in code without opening the shell?! I mean to perform this commands from code itself. I can parse the output files also.. If it is possible to handle this code itself without opening the shell, then am fully done with everything i want.. :)

Thank you very much for your reply.