1) PDC, 2) Atribuição de Nomes de Domínio, 3) Esquema, 4) RID, 5) Infraestrutura
Source Code:
<DataSourceModuleType ID="Microsoft.Windows.Server.2012.AD.Performance.FsmoResponse.DataSource" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="FsmoType" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
<OverrideableParameter ID="FsmoType" Selector="$Config/FsmoType$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="System!System.CommandExecuterPropertyBagSource">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<ApplicationName>%windir%\system32\cscript.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>//nologo $file/Ping_Bind_FSMO_Performance.vbs$ $Config/FsmoType$ </CommandLine>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>Ping_Bind_FSMO_Performance.vbs</Name>
<Contents><Script>'*************************************************************************
' Script Name - Ping and Bind FSMO Performance
'
' Purpose - Pings and binds to a particular FSMO holder
' and returns the time taken for each operation
'
' (c) Copyright 2014, Microsoft Corporation, All Rights Reserved
' Proprietary and confidential to Microsoft Corporation
'*************************************************************************
Option Explicit
SetLocale("en-us")
' TypedPropertyBag
const PerformanceDataType = 2
Sub Main()
Dim oAPI, oBag, oParams, oRootDSE, oDomain, oFsmo
Dim iFsmoType, oPing, oNtds, oFsmoHolder, dtStart, iTime
Dim sStatusObject, sStatusPingCounter, sStatusBindCounter, sStatusPingInstance, sStatusBindInstance
Set oAPI = CreateObject("Mom.ScriptAPI")
Set oParams = WScript.Arguments
if oParams.Count <> 1 then
iFsmoType = 1
Else
iFsmoType = CInt(oParams(0))
if iFsmoType > 5 or iFsmoType < 1 then
iFsmoType = 1
End if
End if
On Error Resume Next
Set oRootDSE = GetObject("LDAP://rootDSE")
If iFsmoType = 1 Then
Set oDomain = GetObject ("LDAP://" & oRootDSE.Get("defaultNamingContext"))
sStatusObject = "PDC Op Master"
sStatusBindCounter = "Op Master PDC Last Bind"
sStatusBindInstance = "PDC bind latency"
sStatusPingCounter = "Op Master PDC Last Ping"
sStatusPingInstance = "PDC ping latency"
ElseIf iFsmoType = 2 Then
Set oDomain = GetObject("LDAP://CN=Partitions," & oRootDSE.Get("configurationNamingContext"))
sStatusObject = "Domain Naming Op Master"
sStatusBindCounter = "Op Master Domain Naming Last Bind"
sStatusBindInstance = "Domain Naming Master bind latency"
sStatusPingCounter = "Op Master Domain Naming Last Ping"
sStatusPingInstance = "Domain Naming Master ping latency"
ElseIf iFsmoType = 3 Then
Set oDomain = GetObject ("LDAP://" & oRootDSE.Get("schemaNamingContext"))
sStatusObject = "Schema Op Master"
sStatusBindCounter = "Op Master Schema Last Bind"
sStatusBindInstance = "Schema Master bind latency"
sStatusPingCounter = "Op Master Schema Last Ping"
sStatusPingInstance = "Schema Master ping latency"
ElseIf iFsmoType = 4 Then
Set oDomain = GetObject("LDAP://CN=RID Manager$,CN=System," & oRootDSE.Get("defaultNamingContext"))
sStatusObject = "RID Op Master"
sStatusBindCounter = "Op Master RID Last Bind"
sStatusBindInstance = "RID Master bind latency"
sStatusPingCounter = "Op Master RID Last Ping"
sStatusPingInstance = "RID Master ping latency"
Else
Set oDomain = GetObject("LDAP://CN=Infrastructure," & oRootDSE.Get("defaultNamingContext"))
sStatusObject = "Infrastructure Op Master"
sStatusBindCounter = "Op Master Infrastructure Last Bind"
sStatusBindInstance = "Infrastructure Master bind latency"
sStatusPingCounter = "Op Master Infrastructure Last Ping"
sStatusPingInstance = "Infrastructure Master ping latency"
End If
oFsmo = oDomain.Get("fSMORoleOwner")
Set oNtds = GetObject("LDAP://" & oFsmo)
Set oFsmoHolder = GetObject(oNtds.Parent)
dtStart = Now
Set oPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & oFsmoHolder.dnsHostName & "'")
iTime = DateDiff("s", dtStart, Now)