Genel Katalog Yanıt Performansı Betiği Veri kaynağı
Microsoft.Windows.AD.DomainMemberPerspective.Performance.GlobalCatalog.DataSource (DataSourceModuleType)
Genel Katalog Yanıt performansı izleyicileri için veri kaynağı.
Element properties:
Member Modules:
Overrideable Parameters:
Source Code:
<DataSourceModuleType ID="Microsoft.Windows.AD.DomainMemberPerspective.Performance.GlobalCatalog.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"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" 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/GlobalCatalogPerformance.vbs$</CommandLine>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>GlobalCatalogPerformance.vbs</Name>
<Contents><Script>'*************************************************************************
' Script Name - AD Global Catalog Search Response
'
' Purpose - Monitors the responsiveness of global catalog queries
'
' (c) Copyright 2014, Microsoft Corporation, All Rights Reserved
' Proprietary and confidential to Microsoft Corporation
'*************************************************************************
Option Explicit
On Error Resume Next
SetLocale("en-us")
' TypedPropertyBag
const PerformanceDataType = 2
Sub Main()
Dim oAPI, oBag, oSysInfo, sDomain, dtStart, iTime, oADO, sQuery, oResult
Set oAPI = CreateObject("Mom.ScriptAPI")
Set oBag= oAPI.CreateTypedPropertyBag(PerformanceDataType)
set oSysInfo = CreateObject("ADSystemInfo")
sDomain = oSysInfo.DomainDNSName
Set oADO = CreateObject("ADODB.Connection")
oADO.Provider = "ADSDsOObject"
oADO.Open "ADs Provider"
sQuery = "<GC://" & sDomain & ">;(objectCategory=DMD);cn;subtree"
dtStart = Now
Set oResult = oADO.Execute(sQuery)
iTime = DateDiff("s", dtStart, Now)
Call oBag.AddValue("StatusObject", "Global Catalog Response Time")
Call oBag.AddValue("StatusCounter", "GC Search Time")
Call oBag.AddValue("StatusInstance", "")
Call oBag.AddValue("StatusValue", "" & iTime / 1000)
Call oAPI.Return(oBag)
End Sub
Call Main()
</Script></Contents>
<Unicode>1</Unicode>
</File>
</Files>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>