protected override void InternalProcessRecord() { base.InternalProcessRecord(); QueryFilter filter = new ComparisonFilter(ComparisonOperator.Equal, PublicFolderTreeSchema.PublicFolderTreeType, PublicFolderTreeType.Mapi); PublicFolderTree[] array = ((IConfigurationSession)base.DataSession).Find <PublicFolderTree>(null, QueryScope.SubTree, filter, null, 0); if (array == null || array.Length == 0) { PublicFolderTreeContainer publicFolderTreeContainer = this.InstallConfigurationObject <PublicFolderTreeContainer>(this.DataObject.Id.GetChildId(PublicFolderTreeContainer.DefaultName), false); this.InstallConfigurationObject <PublicFolderTree>(publicFolderTreeContainer.Id.GetChildId(PublicFolderTree.DefaultName), true); } this.InstallConfigurationObject <ServersContainer>(this.DataObject.Id.GetChildId(ServersContainer.DefaultName), false); this.InstallConfigurationObject <Container>(ClientAccessArray.GetParentContainer((ITopologyConfigurationSession)base.DataSession), false); this.InstallConfigurationObject <DatabasesContainer>(this.DataObject.Id.GetChildId(DatabasesContainer.DefaultName), false); this.InstallConfigurationObject <DatabaseAvailabilityGroupContainer>(this.DataObject.Id.GetChildId(DatabaseAvailabilityGroupContainer.DefaultName), false); AdvancedSecurityContainer advancedSecurityContainer = this.InstallConfigurationObject <AdvancedSecurityContainer>(this.DataObject.Id.GetChildId("Advanced Security"), false); Encryption encryption = new Encryption(); encryption[EncryptionSchema.LegacyExchangeDN] = string.Format("{0}/cn=Configuration/cn={1}", this.DataObject.LegacyExchangeDN, Encryption.DefaultName); this.InstallConfigurationObject <Encryption>(advancedSecurityContainer.Id.GetChildId(Encryption.DefaultName), false, encryption); this.InstallConfigurationObject <LegacyGwart>(this.DataObject.Id.GetChildId(LegacyGwart.DefaultName), false); this.InstallConfigurationObject <RoutingGroupsContainer>(this.DataObject.Id.GetChildId(RoutingGroupsContainer.DefaultName), false); this.InstallConfigurationObject <RoutingGroup>(this.DataObject.Id.GetChildId(RoutingGroupsContainer.DefaultName).GetChildId(RoutingGroup.DefaultName), false); this.InstallConfigurationObject <ConnectorsContainer>(this.DataObject.Id.GetChildId(RoutingGroupsContainer.DefaultName).GetChildId(RoutingGroup.DefaultName).GetChildId("Connections"), false); }
protected override void InternalBeginProcessing() { TaskLogger.LogEnter(); base.InternalBeginProcessing(); if (Datacenter.IsMultiTenancyEnabled()) { this.isMultiTenancy = true; } else { this.isMultiTenancy = false; } this.exs = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.ExSWkGuid); if (this.exs == null) { base.ThrowTerminatingError(new ExSGroupNotFoundException(WellKnownGuid.ExSWkGuid), ErrorCategory.InvalidData, null); } base.LogReadObject(this.exs); this.eoa = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.EoaWkGuid); if (this.eoa == null) { base.ThrowTerminatingError(new ExOrgAdminSGroupNotFoundException(WellKnownGuid.EoaWkGuid), ErrorCategory.InvalidData, null); } base.LogReadObject(this.eoa); this.era = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.EraWkGuid); if (this.era == null) { base.ThrowTerminatingError(new ExOrgReadAdminSGroupNotFoundException(WellKnownGuid.EraWkGuid), ErrorCategory.InvalidData, null); } base.LogReadObject(this.eoa); this.mas = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.MaSWkGuid); if (this.mas == null) { base.ThrowTerminatingError(new ExOrgReadAdminSGroupNotFoundException(WellKnownGuid.MaSWkGuid), ErrorCategory.InvalidData, null); } base.LogReadObject(this.mas); this.epa = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.EpaWkGuid); if (this.epa != null) { base.LogReadObject(this.epa); } this.ets = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.EtsWkGuid); if (this.ets == null) { base.ThrowTerminatingError(new ExTrustedSubsystemGroupNotFoundException(WellKnownGuid.EtsWkGuid), ErrorCategory.InvalidData, null); } base.LogReadObject(this.ets); this.delegatedSetupRG = base.ResolveExchangeGroupGuid <ADGroup>(WellKnownGuid.RgDelegatedSetupWkGuid); DelegatedSetupRoleGroupValueEnum delegatedSetupRoleGroupValue = VariantConfiguration.InvariantNoFlightingSnapshot.AD.DelegatedSetupRoleGroupValue.DelegatedSetupRoleGroupValue; if (delegatedSetupRoleGroupValue == DelegatedSetupRoleGroupValueEnum.NotExists || Datacenter.IsForefrontForOfficeDatacenter()) { if (this.delegatedSetupRG != null) { base.ThrowTerminatingError(new ExRbacRoleGroupInMultiTenantException(WellKnownGuid.RgDelegatedSetupWkGuid, "Delegated Setup"), ErrorCategory.InvalidData, null); } } else if (delegatedSetupRoleGroupValue == DelegatedSetupRoleGroupValueEnum.Exists) { if (this.delegatedSetupRG == null) { base.ThrowTerminatingError(new ExRbacRoleGroupNotFoundException(WellKnownGuid.RgDelegatedSetupWkGuid, "Delegated Setup"), ErrorCategory.InvalidData, null); } base.LogReadObject(this.delegatedSetupRG); } this.autodiscoverContainer = this.ReadCriticalObjectFromRootOrg <ADContainer>(((ITopologyConfigurationSession)this.configurationSession).GetAutoDiscoverGlobalContainerId()); this.orgContainer = this.configurationSession.GetOrgContainer(); base.LogReadObject(this.orgContainer); if (Datacenter.IsMultiTenancyEnabled()) { ADObjectId configurationUnitsRootForLocalForest = ADSession.GetConfigurationUnitsRootForLocalForest(); ITenantConfigurationSession tenantConfigurationSession = DirectorySessionFactory.Default.CreateTenantConfigurationSession(false, ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromAllTenantsObjectId(configurationUnitsRootForLocalForest), 1413, "InternalBeginProcessing", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\DirectorySetup\\InitializeExchangeConfigContainer.cs"); this.confUnitsContainer = tenantConfigurationSession.Read <Container>(configurationUnitsRootForLocalForest); if (this.confUnitsContainer != null) { base.LogReadObject(this.confUnitsContainer); } } this.addressingContainer = this.ReadCriticalObject <Container>(this.orgContainer.Id.GetChildId("Addressing")); this.meServicesContainer = this.configurationSession.GetExchangeConfigurationContainer(); base.LogReadObject(this.meServicesContainer); ADObjectId childId = this.orgContainer.Id.GetChildId("Address Lists Container"); this.addressListsContainer = this.ReadCriticalObject <Container>(childId); this.offlineAddressListsContainer = this.ReadCriticalObject <Container>(childId.GetChildId("Offline Address Lists")); this.recipPoliciesContainer = this.ReadCriticalObject <RecipientPoliciesContainer>(this.orgContainer.Id.GetChildId("Recipient Policies")); this.sitesContainer = this.ReadCriticalObject <SitesContainer>(this.configurationSession.ConfigurationNamingContext.GetChildId("Sites")); this.administrativeGroup = ((ITopologyConfigurationSession)this.configurationSession).GetAdministrativeGroup(); base.LogReadObject(this.administrativeGroup); this.arraysContainer = this.ReadCriticalObject <Container>(ClientAccessArray.GetParentContainer((ITopologyConfigurationSession)this.configurationSession)); TaskLogger.LogExit(); }