신뢰할 수 있는 시간 서버 스크립트 데이터 원본
Microsoft.Windows.AD.DomainMemberPerspective.Availability.Gtimeserver.DataSource (DataSourceModuleType)
신뢰할 수 있는 시간 서버 모니터의 데이터 원본입니다.
Element properties: Member Modules:
Overrideable Parameters:
Source Code: <DataSourceModuleType ID="Microsoft.Windows.AD.DomainMemberPerspective.Availability.Gtimeserver.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/GtimeServer.vbs$</CommandLine>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>GtimeServer.vbs</Name>
<Contents><Script> '*************************************************************************
' Script Name - GtimeServer Check
'
' Purpose - Monitors that there is at least one DC specified as a gtimeserver
'
' (c) Copyright 2014, Microsoft Corporation, All Rights Reserved
' Proprietary and confidential to Microsoft Corporation
'*************************************************************************
Option Explicit
SetLocale("en-us")
Sub Main()
Dim oAPI, oBag, oShell, oShellExec, iResult
Set oAPI = CreateObject("Mom.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
Set oShell = CreateObject("Wscript.Shell")
iResult = oShell.Run("cmd.exe /c nltest /dsgetdc: /gtimeserv | findstr /si GTIMESERV", 0, true)
if (iResult <> 0) Then
oBag.AddValue "State", "BAD"
oBag.AddValue "ErrorString", "Unable to locate at least one DC specified as a gtimeserver."
Else
oBag.AddValue "State", "GOOD"
End If
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>