Пример #1
0
        internal static void InitializeForestModeFlagForLocalForest()
        {
            string localForestFqdn = TopologyProvider.LocalForestFqdn;

            try
            {
                ADSession.IsTenantConfigInDomainNC(localForestFqdn);
            }
            catch (OrgContainerNotFoundException)
            {
                if (Globals.IsDatacenter)
                {
                    if (Globals.IsMicrosoftHostedOnly)
                    {
                        InternalDirectoryRootOrganizationCache.InitializeForestModeFlagForSetup(localForestFqdn, TenantCULocation.DomainNC);
                    }
                    else
                    {
                        InternalDirectoryRootOrganizationCache.InitializeForestModeFlagForSetup(localForestFqdn, TenantCULocation.ConfigNC);
                    }
                }
                else
                {
                    InternalDirectoryRootOrganizationCache.InitializeForestModeFlagForSetup(localForestFqdn, TenantCULocation.ConfigNC);
                }
            }
            finally
            {
                InternalDirectoryRootOrganizationCache.GetTenantCULocation(localForestFqdn);
            }
        }
Пример #2
0
        internal static ADObjectId GetConfigurationUnitsRoot(string partitionFqdn)
        {
            ADObjectId adobjectId = ADSession.IsTenantConfigInDomainNC(partitionFqdn) ? ADSession.GetRootDomainNamingContext(partitionFqdn) : ADSession.GetMicrosoftExchangeRoot(ADSession.GetConfigurationNamingContext(partitionFqdn));

            return(adobjectId.GetChildId("CN", ADObject.ConfigurationUnits));
        }
Пример #3
0
 internal static bool IsTenantConfigObjectInCorrectNC(ADObjectId tenantObjectId)
 {
     return(tenantObjectId == null || tenantObjectId.DomainId == null || ADSessionSettings.IsForefrontObject(tenantObjectId) || tenantObjectId.ToDNString().IndexOf("cn=configuration,dc=", StringComparison.OrdinalIgnoreCase) < 0 || !ADSession.IsTenantConfigInDomainNC(tenantObjectId.GetPartitionId().ForestFQDN));
 }