diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
index 99362901..d8b40300 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
@@ -5,11 +5,11 @@
-
+
-
+
@@ -21,6 +21,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
index a932dae7..5e35cf33 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
@@ -1934,13 +1934,22 @@ namespace WebsitePanel.Providers.HostedSolution
if (enabledLitigationHold)
{
- cmd.Parameters.Add("LitigationHoldEnabled", true);
cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace));
cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning));
}
ExecuteShellCommand(runSpace, cmd);
+ //Litigation Hold
+ if (enabledLitigationHold)
+ {
+ cmd = new Command("New-MailboxSearch");
+ cmd.Parameters.Add("Name", upn);
+ cmd.Parameters.Add("InPlaceHoldEnabled", enabledLitigationHold);
+ cmd.Parameters.Add("SourceMailboxes", upn);
+ ExecuteShellCommand(runSpace, cmd);
+ }
+
//Client Access
cmd = new Command("Set-CASMailbox");
cmd.Parameters.Add("Identity", id);
@@ -2267,7 +2276,7 @@ namespace WebsitePanel.Providers.HostedSolution
info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName");
info.HideFromAddressBook = (bool)GetPSObjectProperty(mailbox, "HiddenFromAddressListsEnabled");
- info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled");
+
Command cmd = new Command("Get-User");
cmd.Parameters.Add("Identity", accountName);
@@ -2298,6 +2307,18 @@ namespace WebsitePanel.Providers.HostedSolution
info.WebPage = (string)GetPSObjectProperty(user, "WebPage");
info.Notes = (string)GetPSObjectProperty(user, "Notes");
+ //Litigation Hold
+ info.EnableLitigationHold = false;
+ cmd = new Command("Get-MailboxSearch");
+ cmd.Parameters.Add("Identity", accountName);
+ result = ExecuteShellCommand(runSpace, cmd);
+ if ((result != null) & (result.Count > 0))
+ {
+ mailbox = result[0];
+ info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled");
+ }
+
+
}
finally
{
@@ -2478,8 +2499,6 @@ namespace WebsitePanel.Providers.HostedSolution
info.KeepDeletedItemsDays =
ConvertEnhancedTimeSpanToDays((EnhancedTimeSpan)GetPSObjectProperty(mailbox, "RetainDeletedItemsFor"));
- info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled");
-
info.RecoverabelItemsSpace =
ConvertUnlimitedToKB((Unlimited)GetPSObjectProperty(mailbox, "RecoverableItemsQuota"));
info.RecoverabelItemsWarning =
@@ -2497,6 +2516,18 @@ namespace WebsitePanel.Providers.HostedSolution
info.EnablePOP = (bool)GetPSObjectProperty(mailbox, "PopEnabled");
info.EnableIMAP = (bool)GetPSObjectProperty(mailbox, "ImapEnabled");
+ //Litigation Hold
+ info.EnableLitigationHold = false;
+ cmd = new Command("Get-MailboxSearch");
+ cmd.Parameters.Add("Identity", accountName);
+ result = ExecuteShellCommand(runSpace, cmd);
+ if ((result != null) & (result.Count > 0))
+ {
+ mailbox = result[0];
+ info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled");
+ }
+
+
//Statistics
cmd = new Command("Get-MailboxStatistics");
cmd.Parameters.Add("Identity", accountName);
@@ -2558,9 +2589,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB));
cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB));
- cmd.Parameters.Add("LitigationHoldEnabled", enabledLitigationHold);
cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace));
-
cmd.Parameters.Add("RetentionUrl", litigationHoldUrl);
cmd.Parameters.Add("RetentionComment", litigationHoldMsg);
@@ -2568,6 +2597,16 @@ namespace WebsitePanel.Providers.HostedSolution
ExecuteShellCommand(runSpace, cmd);
+ //LitigationHold
+ cmd = new Command("Get-MailboxSearch");
+ cmd.Parameters.Add("Identity", accountName);
+ Collection result = ExecuteShellCommand(runSpace, cmd);
+ cmd = new Command((result == null) || (result.Count == 0) ? "New-MailboxSearch" : "Set-MailboxSearch");
+ cmd.Parameters.Add((result == null) || (result.Count == 0) ? "Name" : "Identity", accountName);
+ cmd.Parameters.Add("InPlaceHoldEnabled", enabledLitigationHold);
+ cmd.Parameters.Add("SourceMailboxes", accountName);
+ ExecuteShellCommand(runSpace, cmd);
+
//Client Access
cmd = new Command("Set-CASMailbox");
cmd.Parameters.Add("Identity", accountName);
@@ -2943,7 +2982,6 @@ namespace WebsitePanel.Providers.HostedSolution
string path = AddADPrefix(dn);
DirectoryEntry entry = GetADObject(path);
info.Enabled = !(bool)entry.InvokeGet("AccountDisabled");
- info.LitigationHoldEnabled = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled");
info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName");
SmtpAddress smtpAddress = (SmtpAddress)GetPSObjectProperty(mailbox, "PrimarySmtpAddress");
@@ -2953,6 +2991,7 @@ namespace WebsitePanel.Providers.HostedSolution
info.MaxSize = ConvertUnlimitedToBytes((Unlimited)GetPSObjectProperty(mailbox, "ProhibitSendReceiveQuota"));
DateTime? whenCreated = (DateTime?)GetPSObjectProperty(mailbox, "WhenCreated");
info.AccountCreated = ConvertNullableToDateTime(whenCreated);
+
//Client Access
Command cmd = new Command("Get-CASMailbox");
cmd.Parameters.Add("Identity", id);
@@ -2965,6 +3004,17 @@ namespace WebsitePanel.Providers.HostedSolution
info.POPEnabled = (bool)GetPSObjectProperty(mailbox, "PopEnabled");
info.IMAPEnabled = (bool)GetPSObjectProperty(mailbox, "ImapEnabled");
+ //Litigation Hold
+ info.LitigationHoldEnabled = false;
+ cmd = new Command("Get-MailboxSearch");
+ cmd.Parameters.Add("Identity", id);
+ result = ExecuteShellCommand(runSpace, cmd);
+ if ((result != null) & (result.Count > 0))
+ {
+ mailbox = result[0];
+ info.LitigationHoldEnabled = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled");
+ }
+
//Statistics
cmd = new Command("Get-MailboxStatistics");
cmd.Parameters.Add("Identity", id);