Fix archiving

This commit is contained in:
dev_amdtel 2014-06-10 17:03:26 +04:00
parent d53f450523
commit a17e35e589
7 changed files with 104 additions and 14 deletions

View file

@ -3079,6 +3079,22 @@ namespace WebsitePanel.Providers.HostedSolution
info.LastLogon = DateTime.MinValue;
}
cmd = new Command("Get-MailboxStatistics");
cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Archive");
result = ExecuteShellCommand(runSpace, cmd);
if (result.Count > 0)
{
PSObject statistics = result[0];
Unlimited<ByteQuantifiedSize> totalItemSize =
(Unlimited<ByteQuantifiedSize>)GetPSObjectProperty(statistics, "TotalItemSize");
info.ArchivingTotalSize = ConvertUnlimitedToBytes(totalItemSize);
}
else
{
info.ArchivingTotalSize = 0;
}
if (info.LitigationHoldEnabled)
{
cmd = new Command("Get-MailboxFolderStatistics");