diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index 1490ca72..0669805a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -1971,6 +1971,12 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("ImapEnabled", enableIMAP); ExecuteShellCommand(runSpace, cmd); + //calendar settings + if (accountType == ExchangeAccountType.Equipment || accountType == ExchangeAccountType.Room) + { + SetCalendarSettings(runSpace, id); + } + //add to the security group cmd = new Command("Add-DistributionGroupMember"); cmd.Parameters.Add("Identity", organizationId); @@ -2008,6 +2014,7 @@ namespace WebsitePanel.Providers.HostedSolution CloseRunspace(runSpace); } } + internal virtual void SetCalendarSettings(Runspace runspace, string id) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs index e4634f08..c7d412c8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs @@ -1892,7 +1892,7 @@ namespace WebsitePanel.Providers.HostedSolution //calendar settings if (accountType == ExchangeAccountType.Equipment || accountType == ExchangeAccountType.Room) { - //SetCalendarSettings(runSpace, id); + SetCalendarSettings(runSpace, id); } ret = string.Format("{0}\\{1}", GetNETBIOSDomainName(), accountName); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs index e6a5f908..fc3f386e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs @@ -438,6 +438,12 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("ImapEnabled", enableIMAP); ExecuteShellCommand(runSpace, cmd); + //calendar settings + if (accountType == ExchangeAccountType.Equipment || accountType == ExchangeAccountType.Room) + { + SetCalendarSettings(runSpace, id); + } + //add to the security group cmd = new Command("Add-DistributionGroupMember"); cmd.Parameters.Add("Identity", organizationId); @@ -477,6 +483,16 @@ namespace WebsitePanel.Providers.HostedSolution } + internal override void SetCalendarSettings(Runspace runspace, string id) + { + ExchangeLog.LogStart("SetCalendarSettings"); + Command cmd = new Command("Set-CalendarProcessing"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("AutomateProcessing", CalendarProcessingFlags.AutoAccept); + ExecuteShellCommand(runspace, cmd); + ExchangeLog.LogEnd("SetCalendarSettings"); + } + internal override void DisableMailboxInternal(string id) { ExchangeLog.LogStart("DisableMailboxInternal"); @@ -803,7 +819,7 @@ namespace WebsitePanel.Providers.HostedSolution if (value == 14) { value = (int)rk.GetValue("MsiProductMinor", null); - if (value == 2) bResult = true; + if ((value == 2) | (value == 3)) bResult = true; } rk.Close(); }