protected override void WriteResult(IConfigurable dataObject) { TaskLogger.LogEnter(new object[] { dataObject.Identity, dataObject }); ClientAccessServer clientAccessServer = new ClientAccessServer((Server)dataObject); if (this.IncludeAlternateServiceAccountCredentialPassword.ToBool()) { SetClientAccessServer.EnsureRunningOnTargetServer(this, (Server)dataObject); clientAccessServer.AlternateServiceAccountConfiguration = AlternateServiceAccountConfiguration.LoadWithPasswordsFromRegistry(); } else if (this.IncludeAlternateServiceAccountCredentialStatus.ToBool()) { clientAccessServer.AlternateServiceAccountConfiguration = AlternateServiceAccountConfiguration.LoadFromRegistry(clientAccessServer.Fqdn); } IConfigurable[] array = this.ConfigurationSession.Find <ADRpcHttpVirtualDirectory>((ADObjectId)clientAccessServer.Identity, QueryScope.SubTree, null, null, 1); clientAccessServer.OutlookAnywhereEnabled = new bool?(array.Length > 0); QueryFilter filter = ExchangeScpObjects.AutodiscoverUrlKeyword.Filter; array = this.ConfigurationSession.Find <ADServiceConnectionPoint>((ADObjectId)clientAccessServer.Identity, QueryScope.SubTree, filter, null, 2); if (array.Length == 1) { ADServiceConnectionPoint adserviceConnectionPoint = array[0] as ADServiceConnectionPoint; if (adserviceConnectionPoint.ServiceBindingInformation.Count > 0) { clientAccessServer.AutoDiscoverServiceInternalUri = new Uri(adserviceConnectionPoint.ServiceBindingInformation[0]); } clientAccessServer.AutoDiscoverServiceGuid = new Guid?(GetClientAccessServer.ScpUrlGuid); clientAccessServer.AutoDiscoverServiceCN = Fqdn.Parse(adserviceConnectionPoint.ServiceDnsName); clientAccessServer.AutoDiscoverServiceClassName = adserviceConnectionPoint.ServiceClassName; if (adserviceConnectionPoint.Keywords != null && adserviceConnectionPoint.Keywords.Count > 1) { MultiValuedProperty <string> multiValuedProperty = null; foreach (string text in adserviceConnectionPoint.Keywords) { if (text.StartsWith("site=", StringComparison.OrdinalIgnoreCase)) { if (multiValuedProperty == null) { multiValuedProperty = new MultiValuedProperty <string>(); } multiValuedProperty.Add(text.Substring(5)); } } if (multiValuedProperty != null && multiValuedProperty.Count > 0) { clientAccessServer.AutoDiscoverSiteScope = multiValuedProperty; } } } base.WriteResult(clientAccessServer); TaskLogger.LogExit(); }
public static void GetAutoDiscoverVirtualDirectoryPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store) { DataRow row = dataTable.Rows[0]; ClientAccessServer clientAccessServer = (ClientAccessServer)store.GetDataObject("ClientAccessServer"); if (clientAccessServer != null && clientAccessServer.AutoDiscoverServiceInternalUri != null) { CertificateHelper.GetOneItem(row, "AutoInternalDomain", clientAccessServer.AutoDiscoverServiceInternalUri.Host); } }
public ClientAccessServerIdParameter(ClientAccessServer caServer) : base(caServer.Id) { }
public ClientAccessServerOrArrayIdParameter(ClientAccessServer caServer) : this(caServer.Id) { }