Renommer un DC
Toute la procédure en exemple
C:\Users\administrateur.YourDomain>dcdiag /v /test:machineaccount /s:Your-dc-03
Diagnostic du serveur d'annuaire
Exécution de l'installation initiale :
* Connexion au service d'annuaire sur le serveur Your-dc-03.
* Forêt AD identifiée.
Collecting AD specific global data
* Collecte des informations sur le site.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=YourDomain,DC=example,LDAP_SCOPE_SUBTREE,(objectCategory=ntDSSiteSettings),.....
..
The previous call succeeded
Iterating through the sites
Looking at base site object: CN=NTDS Site Settings,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=example
Getting ISTG and options for the site
* Identification de tous les serveurs.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=YourDomain,DC=example,LDAP_SCOPE_SUBTREE,(objectClass=ntDSDsa),.......
The previous call succeeded....
The previous call succeeded
Iterating through the list of servers
Getting information for the server CN=NTDS Settings,CN=Your-dc-02,CN=Servers,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=arsyst
emes,DC=fr
objectGuid obtained
InvocationID obtained
dnsHostname obtained
site info obtained
All the info for the server collected
Getting information for the server CN=NTDS Settings,CN=Your-dc-03,CN=Servers,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=arsyst
emes,DC=fr
objectGuid obtained
InvocationID obtained
dnsHostname obtained
site info obtained
All the info for the server collected
* Identification de toutes les références croisées NC.
* 2 contrôleurs de domaine ont été trouvés. Test de 1 d'entre eux.
Collecte des informations initiales terminée.
Exécution des tests initiaux nécessaires
Test du serveur : Your-Site-Datacenter\Your-dc-03
Démarrage du test : Connectivity
* Active Directory LDAP Services Check
Determining IP4 connectivity
* Active Directory RPC Services Check
......................... Le test Connectivity
de Your-dc-03 a réussi
Exécution des tests principaux
Test du serveur : Your-Site-Datacenter\Your-dc-03
Test omis à la demande de l'utilisateur : Advertising
Test omis à la demande de l'utilisateur : CheckSecurityError
Test omis à la demande de l'utilisateur : CutoffServers
Test omis à la demande de l'utilisateur : FrsEvent
Test omis à la demande de l'utilisateur : DFSREvent
Test omis à la demande de l'utilisateur : SysVolCheck
Test omis à la demande de l'utilisateur : KccEvent
Test omis à la demande de l'utilisateur : KnowsOfRoleHolders
Démarrage du test : MachineAccount
Checking machine account for DC Your-dc-03 on DC Your-dc-03.
* SPN found :LDAP/Your-dc-03.YourDomain.example/YourDomain.example
* SPN found :LDAP/Your-dc-03.YourDomain.example
* SPN found :LDAP/Your-dc-03
* SPN found :LDAP/Your-dc-03.YourDomain.example/YourDomain
* SPN found :LDAP/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
* SPN found :E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
* SPN found :HOST/Your-dc-03.YourDomain.example/YourDomain.example
* SPN found :HOST/Your-dc-03.YourDomain.example
* SPN found :HOST/Your-dc-03
* SPN found :HOST/Your-dc-03.YourDomain.example/YourDomain
* SPN found :GC/Your-dc-03.YourDomain.example/YourDomain.example
......................... Le test MachineAccount
de Your-dc-03 a réussi
Test omis à la demande de l'utilisateur : NCSecDesc
Test omis à la demande de l'utilisateur : NetLogons
Test omis à la demande de l'utilisateur : ObjectsReplicated
Test omis à la demande de l'utilisateur : OutboundSecureChannels
Test omis à la demande de l'utilisateur : Replications
Test omis à la demande de l'utilisateur : RidManager
Test omis à la demande de l'utilisateur : Services
Test omis à la demande de l'utilisateur : SystemLog
Test omis à la demande de l'utilisateur : Topology
Test omis à la demande de l'utilisateur : VerifyEnterpriseReferences
Test omis à la demande de l'utilisateur : VerifyReferences
Test omis à la demande de l'utilisateur : VerifyReplicas
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : DNS
Exécution de tests de partitions sur ForestDnsZones
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur DomainDnsZones
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur Schema
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur Configuration
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur YourDomain
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests d'entreprise sur YourDomain.example
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : LocatorCheck
Test omis à la demande de l'utilisateur : Intersite
C:\Users\administrateur.YourDomain>dcdiag /v /test:machineaccount /s:Your-dc-01
Diagnostic du serveur d'annuaire
Exécution de l'installation initiale :
* Connexion au service d'annuaire sur le serveur Your-dc-01.
La recherche d'attribut de la fonctionnalité de recherche LDAP a échoué sur le serveur Your-dc-01 ; valeur retournée = 81
L'adresse IP de l'hôte Your-dc-01 n'a pas pu être résolue. Vérifiez le serveur DNS, DHCP, le nom du serveur, etc.
C:\Users\administrateur.YourDomain>setspn -f -Q LDAP/Your-dc-03.YourDomain.example/YourDomain.example
Vérification de la forêt DC=YourDomain,DC=example
CN=Your-dc-03,OU=Domain Controllers,DC=YourDomain,DC=example
DNS/Your-dc-03.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
HOST/Your-dc-03/YourDomain
HOST/Your-dc-03.YourDomain.example/YourDomain
GC/Your-dc-03.YourDomain.example/YourDomain.example
HOST/Your-dc-03.YourDomain.example/YourDomain.example
ldap/Your-dc-03/YourDomain
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain
ldap/Your-dc-03
ldap/Your-dc-03.YourDomain.example
ldap/Your-dc-03.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-03.YourDomain.example
WSMAN/Your-dc-03
WSMAN/Your-dc-03.YourDomain.example
TERMSRV/Your-dc-03
TERMSRV/Your-dc-03.YourDomain.example
RestrictedKrbHost/Your-dc-03
HOST/Your-dc-03
RestrictedKrbHost/Your-dc-03.YourDomain.example
HOST/Your-dc-03.YourDomain.example
SPN existant détecté.
C:\Users\administrateur.YourDomain>setspn -f -Q LDAP/Your-dc-01.YourDomain.example/YourDomain.example
Vérification de la forêt DC=YourDomain,DC=example
Aucun SPN identique détecté.
C:\Users\administrateur.YourDomain>netdom computername Your-dc-03 /add:Your-dc-01
Le nom secondaire spécifié de l'ordinateur « Your-dc-01 » ne contient pas de point.
Bien que ce soit un nom DNS valide, les noms DNS valides sont généralement
composés de plusieurs noms, par exemple, serveur1.microsoft.com. Ce champ DOIT
contenir le nom DNS complet d'un ordinateur.
Voulez-vous continuer (O ou N) ?
n
Le nom secondaire de l'ordinateur n'a pas été ajouté.
L'opération a été annulée par l'utilisateur.
L'opération ne s'est pas bien déroulée.
C:\Users\administrateur.YourDomain>netdom computername Your-dc-03 /add:Your-dc-01.YourDomain.example
Your-dc-01.YourDomain.example a été ajouté
en tant que nom secondaire de l'ordinateur.
L'opération s'est bien déroulée.
C:\Users\administrateur.YourDomain>setspn -f -Q LDAP/Your-dc-03.YourDomain.example/YourDomain.example
Vérification de la forêt DC=YourDomain,DC=example
CN=Your-dc-03,OU=Domain Controllers,DC=YourDomain,DC=example
DNS/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain
GC/Your-dc-01.YourDomain.example/YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain
ldap/Your-dc-01
ldap/Your-dc-01.YourDomain.example
ldap/Your-dc-01.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-01.YourDomain.example
WSMAN/Your-dc-01
WSMAN/Your-dc-01.YourDomain.example
TERMSRV/Your-dc-01
TERMSRV/Your-dc-01.YourDomain.example
RestrictedKrbHost/Your-dc-01
HOST/Your-dc-01
RestrictedKrbHost/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example
DNS/Your-dc-03.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
HOST/Your-dc-03/YourDomain
HOST/Your-dc-03.YourDomain.example/YourDomain
GC/Your-dc-03.YourDomain.example/YourDomain.example
HOST/Your-dc-03.YourDomain.example/YourDomain.example
ldap/Your-dc-03/YourDomain
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain
ldap/Your-dc-03
ldap/Your-dc-03.YourDomain.example
ldap/Your-dc-03.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-03.YourDomain.example
WSMAN/Your-dc-03
WSMAN/Your-dc-03.YourDomain.example
TERMSRV/Your-dc-03
TERMSRV/Your-dc-03.YourDomain.example
RestrictedKrbHost/Your-dc-03
HOST/Your-dc-03
RestrictedKrbHost/Your-dc-03.YourDomain.example
HOST/Your-dc-03.YourDomain.example
SPN existant détecté.
C:\Users\administrateur.YourDomain>setspn -f -Q LDAP/Your-dc-01.YourDomain.example/YourDomain.example
Vérification de la forêt DC=YourDomain,DC=example
CN=Your-dc-03,OU=Domain Controllers,DC=YourDomain,DC=example
DNS/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain
GC/Your-dc-01.YourDomain.example/YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain
ldap/Your-dc-01
ldap/Your-dc-01.YourDomain.example
ldap/Your-dc-01.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-01.YourDomain.example
WSMAN/Your-dc-01
WSMAN/Your-dc-01.YourDomain.example
TERMSRV/Your-dc-01
TERMSRV/Your-dc-01.YourDomain.example
RestrictedKrbHost/Your-dc-01
HOST/Your-dc-01
RestrictedKrbHost/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example
DNS/Your-dc-03.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
HOST/Your-dc-03/YourDomain
HOST/Your-dc-03.YourDomain.example/YourDomain
GC/Your-dc-03.YourDomain.example/YourDomain.example
HOST/Your-dc-03.YourDomain.example/YourDomain.example
ldap/Your-dc-03/YourDomain
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain
ldap/Your-dc-03
ldap/Your-dc-03.YourDomain.example
ldap/Your-dc-03.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-03.YourDomain.example/YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-03.YourDomain.example
WSMAN/Your-dc-03
WSMAN/Your-dc-03.YourDomain.example
TERMSRV/Your-dc-03
TERMSRV/Your-dc-03.YourDomain.example
RestrictedKrbHost/Your-dc-03
HOST/Your-dc-03
RestrictedKrbHost/Your-dc-03.YourDomain.example
HOST/Your-dc-03.YourDomain.example
SPN existant détecté.
C:\Users\administrateur.YourDomain>netdom computername Your-dc-03 /makeprimary:Your-dc-01.YourDomain.example
Your-dc-01.YourDomain.example a été transformé
en nom principal de l'ordinateur. Vous devez redémarrer l'ordinateur pour que
cette modification de nom prenne effet. Si vous ne le faites pas, l'ordinateur
risque de ne pas pouvoir authentifier les utilisateurs et les autres
ordinateurs, ni être authentifié par les autres ordinateurs de la forêt. Le
nouveau nom spécifié a été supprimé de la liste des noms secondaires de
l'ordinateur. Le nom principal de l'ordinateur sera défini sur le nouveau nom
spécifié après le redémarrage.
L'opération s'est bien déroulée.
C:\Users\administrateur.YourDomain>
_________---------------------------------------------------------------------------------
Reboot du DC que l'on vient de renommer
_________---------------------------------------------------------------------------------
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Users\administrateur.YourDomain>netdom computername Your-dc-01 /remove Your-dc-03.YourDomain.example
Your-dc-03.YourDomain.example a été supprimé
en tant que nom secondaire de l'ordinateur.
L'opération s'est bien déroulée.
C:\Users\administrateur.YourDomain>dcdiag /v /test:machineaccount
Diagnostic du serveur d'annuaire
Exécution de l'installation initiale :
Tentative de recherche de serveur associé...
* Vérification que l'ordinateur local Your-dc-01 est un serveur d'annuaire.
Serveur associé : Your-dc-01
* Connexion au service d'annuaire sur le serveur Your-dc-01.
* Forêt AD identifiée.
Collecting AD specific global data
* Collecte des informations sur le site.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=YourDomain,DC=example,LDAP_SCOPE_SUBTREE,(objectCategory=ntDSSiteSettings),.....
..
The previous call succeeded
Iterating through the sites
Looking at base site object: CN=NTDS Site Settings,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=example
Getting ISTG and options for the site
* Identification de tous les serveurs.
Calling ldap_search_init_page(hld,CN=Sites,CN=Configuration,DC=YourDomain,DC=example,LDAP_SCOPE_SUBTREE,(objectClass=ntDSDsa),.......
The previous call succeeded....
The previous call succeeded
Iterating through the list of servers
Getting information for the server CN=NTDS Settings,CN=Your-dc-02,CN=Servers,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=example
objectGuid obtained
InvocationID obtained
dnsHostname obtained
site info obtained
All the info for the server collected
Getting information for the server CN=NTDS Settings,CN=Your-dc-01,CN=Servers,CN=Your-Site-Datacenter,CN=Sites,CN=Configuration,DC=YourDomain,DC=example
objectGuid obtained
InvocationID obtained
dnsHostname obtained
site info obtained
All the info for the server collected
* Identification de toutes les références croisées NC.
* 2 contrôleurs de domaine ont été trouvés. Test de 1 d'entre eux.
Collecte des informations initiales terminée.
Exécution des tests initiaux nécessaires
Test du serveur : Your-Site-Datacenter\Your-dc-01
Démarrage du test : Connectivity
* Active Directory LDAP Services Check
Determining IP4 connectivity
* Active Directory RPC Services Check
......................... Le test Connectivity
de Your-dc-01 a réussi
Exécution des tests principaux
Test du serveur : Your-Site-Datacenter\Your-dc-01
Test omis à la demande de l'utilisateur : Advertising
Test omis à la demande de l'utilisateur : CheckSecurityError
Test omis à la demande de l'utilisateur : CutoffServers
Test omis à la demande de l'utilisateur : FrsEvent
Test omis à la demande de l'utilisateur : DFSREvent
Test omis à la demande de l'utilisateur : SysVolCheck
Test omis à la demande de l'utilisateur : KccEvent
Test omis à la demande de l'utilisateur : KnowsOfRoleHolders
Démarrage du test : MachineAccount
Checking machine account for DC Your-dc-01 on DC Your-dc-01.
* SPN found :LDAP/Your-dc-01.YourDomain.example/YourDomain.example
* SPN found :LDAP/Your-dc-01.YourDomain.example
* SPN found :LDAP/Your-dc-01
* SPN found :LDAP/Your-dc-01.YourDomain.example/YourDomain
* SPN found :LDAP/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
* SPN found :E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
* SPN found :HOST/Your-dc-01.YourDomain.example/YourDomain.example
* SPN found :HOST/Your-dc-01.YourDomain.example
* SPN found :HOST/Your-dc-01
* SPN found :HOST/Your-dc-01.YourDomain.example/YourDomain
* SPN found :GC/Your-dc-01.YourDomain.example/YourDomain.example
......................... Le test MachineAccount
de Your-dc-01 a réussi
Test omis à la demande de l'utilisateur : NCSecDesc
Test omis à la demande de l'utilisateur : NetLogons
Test omis à la demande de l'utilisateur : ObjectsReplicated
Test omis à la demande de l'utilisateur : OutboundSecureChannels
Test omis à la demande de l'utilisateur : Replications
Test omis à la demande de l'utilisateur : RidManager
Test omis à la demande de l'utilisateur : Services
Test omis à la demande de l'utilisateur : SystemLog
Test omis à la demande de l'utilisateur : Topology
Test omis à la demande de l'utilisateur : VerifyEnterpriseReferences
Test omis à la demande de l'utilisateur : VerifyReferences
Test omis à la demande de l'utilisateur : VerifyReplicas
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : DNS
Exécution de tests de partitions sur ForestDnsZones
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur DomainDnsZones
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur Schema
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur Configuration
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests de partitions sur YourDomain
Test omis à la demande de l'utilisateur : CheckSDRefDom
Test omis à la demande de l'utilisateur : CrossRefValidation
Exécution de tests d'entreprise sur YourDomain.example
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : DNS
Test omis à la demande de l'utilisateur : LocatorCheck
Test omis à la demande de l'utilisateur : Intersite
C:\Users\administrateur.YourDomain>
C:\Users\administrateur.YourDomain>setspn /?
Syntaxe : setspn [modificateurs commutateurs] [nomcompte]
où « nomcompte » peut être le nom ou domaine\nom
de l'ordinateur ou du compte utilisateur cible
Commutateurs du mode édition :
-R = réinitialise le nom SPN de HOST
Syntaxe : setspn -R nomcompte
-S = ajoute un SPN arbitraire après avoir vérifié qu'il n'existe
aucun doublon
Syntaxe : setspn -S SPN nomcompte
-D = supprime le SPN arbitraire
Syntaxe : setspn -D SPN nomcompte
-L = répertorie les SPN inscrits sur le compte cible
Syntaxe : setspn [-L] nomcompte
Modificateurs en mode édition :
-C = spécifie que le nom de compte est un nom de compte d'ordinateur
-U = spécifie que le nom de compte est un compte d'utilisateur
Remarque : -C et -U sont exclusifs. Si aucun modificateur n'est
spécifié, l'outil interprète le nom de compte comme nom d'ordinateur
si un tel ordinateur existe, et un nom d'utilisateur dans le cas
contraire.
Commutateurs en mode requête :
-Q = requête sur l'existence du SPN
Syntaxe : setspn -Q SPN
-X = recherche de SPN en double
Syntaxe : setspn -X
Remarque : la recherche de doublons, notamment à l'échelle de la forêt,
peut nécessiter plusieurs minutes et une quantité de mémoire importante.
-Q s'exécutera sur chaque domaine/forêt cible. -X Retourne les doublons
qui existent sur toutes les cibles. Il n'est pas obligatoire que les SPN
soient uniques parmi les forêts, mais les doublons peuvent entraîner des
problèmes d'authentification lors de l'authentification inter-forêt.
Modificateurs en mode requête :
-P = supprime la progression à la console et peut servir lors de
la redirection d'un résultat vers un fichier ou dans un script sans
assistance. Aucun résultat ne sortira tant que la commande n'est pas
terminée.
-F = effectue les requêtes au niveau forêt, plutôt qu'au niveau domaine
-T = effectue la requête sur le domaine ou la forêt spécifié (quand -F
est également utilisé)
Syntaxe : setspn -T domaine (commutateurs et autres paramètres)
"" ou * peuvent être utilisés pour indiquer le domaine ou la forêt
en cours.
Remarque : ces modificateurs peuvent être utilisés avec le commutateur
-S afin de spécifier où le contrôle des doublons doit être effectué
avant l'ajout du SPN.
Remarque : -T peut être spécifié plusieurs fois.
Exemples :
setspn -R serveurDAS1
Inscrit le SPN « HOST/serveurDAS1 » et « HOST/{DNS de serveurDAS1} »
setspn -S http/serveurDAS serveurDAS1
Inscrit le SPN « http/serveurDAS » pour l'ordinateur « serveurDAS1 »"
s'il n'existe pas de tel SPN dans le domaine
setspn -D http/serveurDAS serveurDAS1
Supprime le SPN « http/serveurDAS » pour l'ordinateur « serveurDAS1 »
setspn -F -S http/serveurDAS serveurDAS1
Inscrit le SPN « http/serveurDAS » pour l'ordinateur « serveurDAS1 »
s'il n'existe pas de tel SPN dans la forêt
setspn -U -S http/serveurDAS utilisateurDAS
Inscrit le SPN « http/serveurDAS » pour le compte d'utilisateur
« utilisateurDAS » s'il n'existe pas de tel SPN dans le domaine
setspn -T * -T bar -X
Rapporte toutes les inscriptions dupliquées des SPN dans ce domaine et bar
setspn -T bar -F -Q */daserver
Recherche tous les SPN de la forme */serveurDAS inscrits dans la forêt à
laquelle bar appartient
C:\Users\administrateur.YourDomain>setspn -F -Q LDAP/Your-dc-01.YourDomain.example
Vérification de la forêt DC=YourDomain,DC=example
CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example
HOST/Your-dc-01/YourDomain
ldap/Your-dc-01/YourDomain
DNS/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain
GC/Your-dc-01.YourDomain.example/YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain
ldap/Your-dc-01
ldap/Your-dc-01.YourDomain.example
ldap/Your-dc-01.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain.example
WSMAN/Your-dc-01
WSMAN/Your-dc-01.YourDomain.example
TERMSRV/Your-dc-01
TERMSRV/Your-dc-01.YourDomain.example
RestrictedKrbHost/Your-dc-01
HOST/Your-dc-01
RestrictedKrbHost/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
HOST/Your-dc-03/YourDomain
ldap/Your-dc-03/YourDomain
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
SPN existant détecté.
C:\Users\administrateur.YourDomain>
C:\Users\administrateur.YourDomain>setspn -L LDAP/Your-dc-01.YourDomain.example
FindDomainForAccount : l'appel de DsGetDcNameWithAccountW a échoué avec la valeur de retour 0x00000525
Compte LDAP/Your-dc-01.YourDomain.example introuvable
C:\Users\administrateur.YourDomain>setspn -L Your-dc-01
Noms ServicePrincipalName inscrits pour CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example:
HOST/Your-dc-01/YourDomain
ldap/Your-dc-01/YourDomain
DNS/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain
GC/Your-dc-01.YourDomain.example/YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain
ldap/Your-dc-01
ldap/Your-dc-01.YourDomain.example
ldap/Your-dc-01.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain.example
WSMAN/Your-dc-01
WSMAN/Your-dc-01.YourDomain.example
TERMSRV/Your-dc-01
TERMSRV/Your-dc-01.YourDomain.example
RestrictedKrbHost/Your-dc-01
HOST/Your-dc-01
RestrictedKrbHost/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
HOST/Your-dc-03/YourDomain
ldap/Your-dc-03/YourDomain
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
C:\Users\administrateur.YourDomain>setspn -D HOST/Your-dc-03/YourDomain Your-dc-01
Désinscription des ServicePrincipalNames pour CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example
HOST/Your-dc-03/YourDomain
Objet mis à jour
C:\Users\administrateur.YourDomain>setspn -D ldap/Your-dc-03/YourDomain Your-dc-01
Désinscription des ServicePrincipalNames pour CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example
ldap/Your-dc-03/YourDomain
Objet mis à jour
C:\Users\administrateur.YourDomain>setspn -L Your-dc-01
Noms ServicePrincipalName inscrits pour CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example:
HOST/Your-dc-01/YourDomain
ldap/Your-dc-01/YourDomain
DNS/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain
GC/Your-dc-01.YourDomain.example/YourDomain.example
HOST/Your-dc-01.YourDomain.example/YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain
ldap/Your-dc-01
ldap/Your-dc-01.YourDomain.example
ldap/Your-dc-01.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-01.YourDomain.example/YourDomain.example
WSMAN/Your-dc-01
WSMAN/Your-dc-01.YourDomain.example
TERMSRV/Your-dc-01
TERMSRV/Your-dc-01.YourDomain.example
RestrictedKrbHost/Your-dc-01
HOST/Your-dc-01
RestrictedKrbHost/Your-dc-01.YourDomain.example
HOST/Your-dc-01.YourDomain.example
RPC/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
ldap/8451ad44-2fce-4d96-9f22-b8968ddd106c._msdcs.YourDomain.example
E3514235-4B06-11D1-AB04-00C04FC2DCD2/8451ad44-2fce-4d96-9f22-b8968ddd106c/YourDomain.example
C:\Users\administrateur.YourDomain>setspn -L Your-dc-02
Noms ServicePrincipalName inscrits pour CN=Your-dc-02,OU=Domain Controllers,DC=YourDomain,DC=example:
RPC/59cc0d46-1e58-4038-89e8-4b2988772cb4._msdcs.YourDomain.example
HOST/Your-dc-02/YourDomain
HOST/Your-dc-02.YourDomain.example/YourDomain
GC/Your-dc-02.YourDomain.example/YourDomain.example
HOST/Your-dc-02.YourDomain.example/YourDomain.example
ldap/Your-dc-02/YourDomain
ldap/59cc0d46-1e58-4038-89e8-4b2988772cb4._msdcs.YourDomain.example
ldap/Your-dc-02.YourDomain.example/YourDomain
ldap/Your-dc-02
ldap/Your-dc-02.YourDomain.example
ldap/Your-dc-02.YourDomain.example/ForestDnsZones.YourDomain.example
ldap/Your-dc-02.YourDomain.example/DomainDnsZones.YourDomain.example
ldap/Your-dc-02.YourDomain.example/YourDomain.example
DNS/Your-dc-02.YourDomain.example
WSMAN/Your-dc-02.YourDomain.example
WSMAN/Your-dc-02
E3514235-4B06-11D1-AB04-00C04FC2DCD2/59cc0d46-1e58-4038-89e8-4b2988772cb4/YourDomain.example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-02.YourDomain.example
TERMSRV/Your-dc-02
TERMSRV/Your-dc-02.YourDomain.example
RestrictedKrbHost/Your-dc-02
HOST/Your-dc-02
RestrictedKrbHost/Your-dc-02.YourDomain.example
HOST/Your-dc-02.YourDomain.example
C:\Users\administrateur.YourDomain>
Il manque le SPN DFSR -- Ajout :
C:\Users\administrateur.YourDomain>setspn -S Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-01.YourDomain.example Your-dc-01
Vérification du domaine DC=YourDomain,DC=example
Inscription des ServicePrincipalNames pour CN=Your-dc-01,OU=Domain Controllers,DC=YourDomain,DC=example
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/Your-dc-01.YourDomain.example
Objet mis à jour
C:\Users\administrateur.YourDomain>
--------------
Ensuite :
To update the FRS member object :
---------------------------------
On the Start menu, point to Administrative Tools, and then click Active Directory Users and Computers.
On the View menu, click Advanced Features.
Expand the domain node, System, File Replication Service, and Domain System Volume (SYSVOL share).
The <DomainControllerName> objects below Domain System Volume (SYSVOL share) are the FSR Member objects that correspond
to domain controllers in the domain. Find the <DomainControllerName> object that shows the old name of the domain controller.
Right-click the FRS Member object for the old name of the domain controller, and then click Rename.
Type the new name of the domain controller.
To verify the name change, open ADSI Edit: On the Start menu, point to Administrative Tools, and then click ADSI Edit.
View the fRSMemberReference attribute of the object
CN=Domain System Volume (SYSVOL share),CN=NTFRS Subscriptions,CN=<DomainControllerName>,OU=Domain Controllers,DC=<DomainName>
and confirm that the value in CN=<DomainControllerName> is the new name.
To update the DFS Replication member object :
---------------------------------------------
On the Start menu, point to Administrative Tools, and then click Active Directory Users and Computers.
On the View menu, click Advanced Features.
Expand the domain node, System, DFSR-GlobalSettings, Domain System Volume, and Topology. The <DomainControllerName>
objects below Domain System Volume are the msDFSR-Member objects that correspond to domain controllers in the domain.
Find the <DomainControllerName> object that shows the old name of the domain controller.
Right-click the msDFSR-Member object for the old name of the domain controller, and then click Rename.
Type the new name of the domain controller.
To verify the name change, open ADSI Edit: On the Start menu, point to Administrative Tools, and then click ADSI Edit.
View the msDFSR-MemberReference attribute of the object
CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<DomainControllerName>,OU=Domain Controllers,DC=<DomainName>
and confirm that the value in CN=<DomainControllerName> is the new name.