if(!$CreateSharedConfiguration) { Si ($AuthoritativeOnly) { $acceptedDomains = @(get-accepteddomain-organisation $RoleTenantOrganizationFullPath ...

if(!$CreateSharedConfiguration)          {            Si ($AuthoritativeOnly)            {               $acceptedDomains = @(get-accepteddomain-organisation $RoleTenantOrganizationFullPath | où {$_.Type de domaine - eq "de référence"}) ;            }            autre            {               $acceptedDomains = @(get-accepteddomain-organisation $RoleTenantOrganizationFullPath) ;            }# trier les domaines et placez le domaine initial à la fin de la liste. C'est parce que les dysfonctionnements après que le domaine GLS principal est lié            recherche d'organisation # (get-organisation - XXXX ou jeu-foo-organisation XXX) échoue, car il n'est pas GLS. Par conséquent, cela rend les tentatives            # plus efficace si l'entrée GLS principale pour le nom d'organisation existe toujours.            $acceptedDomains = @($acceptedDomains | trier - InitialDomain de propriété) ;foreach ($acceptedDomain dans $acceptedDomains)            {               $domainname = $acceptedDomain.DomainName.ToString() ;               supprimer-managementendpointhook - DomainName: $domainname - ExternalDirectoryOrganizationId: $RoleTenantExternalDirectoryOrganizationId            }          }