OVH Cloud OVH Cloud

Active directory

4 réponses
Avatar
Phil Dupriez
Bonjour

Savez vous comment je pourrais faire pour trouver

Le maitre d'infrastructure
Le controle de schemas
le domain naming master
le pdc emulator
le RID master

Merci

4 réponses

Avatar
Le Bar
Salut,
Sur le site Crosoft.technet dans le script center il y a ce script qu'il te
faut...



'--- Début du script

Set objRootDSE = GetObject("LDAP://rootDSE")

' Schema Master
Set objSchema = GetObject("LDAP://" & objRootDSE.Get("schemaNamingContext"))
strSchemaMaster = objSchema.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "role 1 Forest-wide Schema Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Domain Naming Master
Set objPartitions = GetObject("LDAP://CN=Partitions," & _
objRootDSE.Get("configurationNamingContext"))
strDomainNamingMaster = objPartitions.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strDomainNamingMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 2 Forest-wide Domain Naming Master FSMO: " &
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' PDC Emulator
Set objDomain = GetObject("LDAP://" &
objRootDSE.Get("defaultNamingContext"))
strPdcEmulator = objDomain.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strPdcEmulator)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 3Domain's PDC Emulator FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' RID Master
Set objRidManager = GetObject("LDAP://CN=RID Manager$,CN=System," & _
objRootDSE.Get("defaultNamingContext"))
strRidMaster = objRidManager.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strRidMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 4 Domain's RID Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Infrastructure Master
Set objInfrastructure = GetObject("LDAP://CN=Infrastructure," & _
objRootDSE.Get("defaultNamingContext"))
strInfrastructureMaster = objInfrastructure.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strInfrastructureMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 5 Domain's Infrastructure Master FSMO: " &
objComputer.Name

'----- Fin du script

Je pense que cela t'ira... ;-)
Christian
claroche@(noSpam)effisoft-consulting.com



"Phil Dupriez" a écrit dans le message de
news:
Bonjour

Savez vous comment je pourrais faire pour trouver

Le maitre d'infrastructure
Le controle de schemas
le domain naming master
le pdc emulator
le RID master

Merci




Avatar
Phil Dupriez
Au risque de me faire passer pour un idiot j'en fais quoi de ce script ? je
le mets ou ?
"Le Bar" <claroche@(no spam)effisoft-group.com> a écrit dans le message de
news:
Salut,
Sur le site Crosoft.technet dans le script center il y a ce script qu'il
te

faut...



'--- Début du script

Set objRootDSE = GetObject("LDAP://rootDSE")

' Schema Master
Set objSchema = GetObject("LDAP://" &
objRootDSE.Get("schemaNamingContext"))

strSchemaMaster = objSchema.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "role 1 Forest-wide Schema Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Domain Naming Master
Set objPartitions = GetObject("LDAP://CN=Partitions," & _

objRootDSE.Get("configurationNamingContext"))

strDomainNamingMaster = objPartitions.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strDomainNamingMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 2 Forest-wide Domain Naming Master FSMO: " &
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' PDC Emulator
Set objDomain = GetObject("LDAP://" &
objRootDSE.Get("defaultNamingContext"))
strPdcEmulator = objDomain.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strPdcEmulator)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 3Domain's PDC Emulator FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' RID Master
Set objRidManager = GetObject("LDAP://CN=RID Manager$,CN=System," & _
objRootDSE.Get("defaultNamingContext"))
strRidMaster = objRidManager.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strRidMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 4 Domain's RID Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Infrastructure Master
Set objInfrastructure = GetObject("LDAP://CN=Infrastructure," & _
objRootDSE.Get("defaultNamingContext"))
strInfrastructureMaster = objInfrastructure.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strInfrastructureMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 5 Domain's Infrastructure Master FSMO: " &
objComputer.Name

'----- Fin du script

Je pense que cela t'ira... ;-)
Christian
claroche@(noSpam)effisoft-consulting.com



"Phil Dupriez" a écrit dans le message de
news:
Bonjour

Savez vous comment je pourrais faire pour trouver

Le maitre d'infrastructure
Le controle de schemas
le domain naming master
le pdc emulator
le RID master

Merci








Avatar
Phil Dupriez
J'ai fait un copier coller dans notepad et j'ai mis l'extesion VBS et avec
l'utilitaire cscript il me donne une erreur

C:>cscript script.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. Tous droits réservés.

C:script.vbs(21, 64) Erreur de compilation Microsoft VBScript: Erreur de
syntax
e


C:>

Que faire ?

"Phil Dupriez" a écrit dans le message de news:

Au risque de me faire passer pour un idiot j'en fais quoi de ce script ?
je

le mets ou ?
"Le Bar" <claroche@(no spam)effisoft-group.com> a écrit dans le message de
news:
Salut,
Sur le site Crosoft.technet dans le script center il y a ce script qu'il
te

faut...



'--- Début du script

Set objRootDSE = GetObject("LDAP://rootDSE")

' Schema Master
Set objSchema = GetObject("LDAP://" &
objRootDSE.Get("schemaNamingContext"))

strSchemaMaster = objSchema.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "role 1 Forest-wide Schema Master FSMO: " &
objComputer.Name



Set objNtds = Nothing
Set objComputer = Nothing

' Domain Naming Master
Set objPartitions = GetObject("LDAP://CN=Partitions," & _

objRootDSE.Get("configurationNamingContext"))

strDomainNamingMaster = objPartitions.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strDomainNamingMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 2 Forest-wide Domain Naming Master FSMO: " &
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' PDC Emulator
Set objDomain = GetObject("LDAP://" &
objRootDSE.Get("defaultNamingContext"))
strPdcEmulator = objDomain.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strPdcEmulator)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 3Domain's PDC Emulator FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' RID Master
Set objRidManager = GetObject("LDAP://CN=RID Manager$,CN=System," & _
objRootDSE.Get("defaultNamingContext"))
strRidMaster = objRidManager.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strRidMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 4 Domain's RID Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Infrastructure Master
Set objInfrastructure = GetObject("LDAP://CN=Infrastructure," & _

objRootDSE.Get("defaultNamingContext"))


strInfrastructureMaster = objInfrastructure.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strInfrastructureMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 5 Domain's Infrastructure Master FSMO: " &
objComputer.Name

'----- Fin du script

Je pense que cela t'ira... ;-)
Christian
claroche@(noSpam)effisoft-consulting.com



"Phil Dupriez" a écrit dans le message de
news:
Bonjour

Savez vous comment je pourrais faire pour trouver

Le maitre d'infrastructure
Le controle de schemas
le domain naming master
le pdc emulator
le RID master

Merci












Avatar
Phil Dupriez
Ok j'ai corrige merci !!
"Phil Dupriez" a écrit dans le message de news:
#cg8#
J'ai fait un copier coller dans notepad et j'ai mis l'extesion VBS et avec
l'utilitaire cscript il me donne une erreur

C:>cscript script.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. Tous droits réservés.

C:script.vbs(21, 64) Erreur de compilation Microsoft VBScript: Erreur de
syntax
e


C:>

Que faire ?

"Phil Dupriez" a écrit dans le message de
news:


Au risque de me faire passer pour un idiot j'en fais quoi de ce script
?


je
le mets ou ?
"Le Bar" <claroche@(no spam)effisoft-group.com> a écrit dans le message
de


news:
Salut,
Sur le site Crosoft.technet dans le script center il y a ce script
qu'il



te
faut...



'--- Début du script

Set objRootDSE = GetObject("LDAP://rootDSE")

' Schema Master
Set objSchema = GetObject("LDAP://" &
objRootDSE.Get("schemaNamingContext"))

strSchemaMaster = objSchema.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "role 1 Forest-wide Schema Master FSMO: " &
objComputer.Name



Set objNtds = Nothing
Set objComputer = Nothing

' Domain Naming Master
Set objPartitions = GetObject("LDAP://CN=Partitions," & _

objRootDSE.Get("configurationNamingContext"))

strDomainNamingMaster = objPartitions.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strDomainNamingMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 2 Forest-wide Domain Naming Master FSMO: " &
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' PDC Emulator
Set objDomain = GetObject("LDAP://" &
objRootDSE.Get("defaultNamingContext"))
strPdcEmulator = objDomain.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strPdcEmulator)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 3Domain's PDC Emulator FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' RID Master
Set objRidManager = GetObject("LDAP://CN=RID Manager$,CN=System," & _
objRootDSE.Get("defaultNamingContext"))
strRidMaster = objRidManager.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strRidMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 4 Domain's RID Master FSMO: " & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

' Infrastructure Master
Set objInfrastructure = GetObject("LDAP://CN=Infrastructure," & _

objRootDSE.Get("defaultNamingContext"))


strInfrastructureMaster = objInfrastructure.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strInfrastructureMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo "Role 5 Domain's Infrastructure Master FSMO: " &
objComputer.Name

'----- Fin du script

Je pense que cela t'ira... ;-)
Christian
claroche@(noSpam)effisoft-consulting.com



"Phil Dupriez" a écrit dans le message de
news:
Bonjour

Savez vous comment je pourrais faire pour trouver

Le maitre d'infrastructure
Le controle de schemas
le domain naming master
le pdc emulator
le RID master

Merci