From 61747a32fcdc1ead8645a47e6a42522019f132ca Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 12 Feb 2015 19:56:48 +0400 Subject: [PATCH] fix tool FixDefaultPublicFolderMailbox --- ...ebsitePanel.FixDefaultPublicFolderMailbox.csproj | 1 + .../app.config | 1 + .../ExchangeServer/ExchangeServerController.cs | 2 +- .../Exchange2013.cs | 13 +++++-------- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/WebsitePanel.FixDefaultPublicFolderMailbox.csproj b/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/WebsitePanel.FixDefaultPublicFolderMailbox.csproj index d9e74e5c..002759e4 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/WebsitePanel.FixDefaultPublicFolderMailbox.csproj +++ b/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/WebsitePanel.FixDefaultPublicFolderMailbox.csproj @@ -36,6 +36,7 @@ False ..\..\..\Lib\Microsoft.Web.Services3.dll + True diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/app.config b/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/app.config index 543667d4..fb112b2a 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/app.config +++ b/WebsitePanel/Sources/Tools/WebsitePanel.FixDefaultPublicFolderMailbox/app.config @@ -2,6 +2,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index 5f6a2acf..ca374742 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -5537,7 +5537,7 @@ namespace WebsitePanel.EnterpriseServer res += id + " has a value \"" + defaultPublicFoldes[0] + "\"" + Environment.NewLine; if (defaultPublicFoldes.Length == 2) - res += id + " changed from \"" + defaultPublicFoldes[0] + "\" to \"" + defaultPublicFoldes[1] + "\"" + Environment.NewLine; + res += id + " changed \"" + defaultPublicFoldes[0] + "\" to \"" + defaultPublicFoldes[1] + "\"" + Environment.NewLine; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 6524feb8..36a2f85f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -5334,16 +5334,13 @@ namespace WebsitePanel.Providers.HostedSolution string newValue = orgCanonicalName + "/" + GetPublicFolderMailboxName(organizationId); - if (newValue != oldValue) - { - cmd = new Command("Set-Mailbox"); - cmd.Parameters.Add("Identity", id); - cmd.Parameters.Add("DefaultPublicFolderMailbox", newValue); + cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("DefaultPublicFolderMailbox", newValue); - ExecuteShellCommand(runSpace, cmd); + ExecuteShellCommand(runSpace, cmd); - res.Add(newValue); - } + res.Add(newValue); } finally