FSMO五种角色的作用、查找及规划
2006-03-29 11:57:21 来源:WEB开发网看到了吧,马上把当前域里的FSMO五种角色所在的域控制器罗列了出来。
3、 脚本。
在这里,我给大家一段脚本:
Set objRootDSE = GetObject("LDAP://rootDSE")
Dim text
' Schema Master
Set objSchema = GetObject("LDAP://" & objRootDSE.Get("schemaNamingContext"))
strSchemaMaster = objSchema.Get("fSMORoleOwner")
Set objNtds = GetObject("LDAP://" & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
text="Forest-wide Schema Master FSMO: " & objComputer.Name & vbCrLf
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)
text=text&"Forest-wide Domain Naming Master FSMO: " & objComputer.Name & vbCrLf
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)
text=text&"Domain's PDC Emulator FSMO: " & objComputer.Name & vbCrLf
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)
text=text&"Domain's RID Master FSMO: " & objComputer.Name & vbCrLf
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)
text=text&"Domain's Infrastructure Master FSMO: " & objComputer.Name & vbCrLf
WScript.Echo text
大家把以上内容复制到记事本,保存为fsmo.vbs,然后到域里的计算机上运行,就可以得到如下画面:
也看到了吧!!!
三、最后来看一下FSMO的规划,在规划时,请大家按以下原则进行:
1、占有Domain Naming Master角色的域控制器必须同时也是GC;
2、不能把Infrastructure Master和GC放在同一台DC上;
3、建议将Schema Master和Domain Naming Master放在森林根域的GC服务器上;
4、建议将Schema Master和Domain Naming Master放在同一台域控制器上;
5、建议将PDC Emulator、RID Master及Infrastructure Master放在同一台性能较好的域控制器上;
6、尽量不要把PDC Emulator、RID Master及Infrastructure Master放置在GC服务器上;
好了,关于FSMO我就先说到这里,请大家多多指正。我的E-Mail:hzswg@sohu.com
更多精彩
赞助商链接