Bu Veri Kaynağı, Windows Server 2012, 2012 R2 ve 2016'daki DNS Rolünü bulur.
Bu Veri Kaynağı, Microsoft Windows Server 2012, 2012 R2 ve 2016'daki DNS rolünü bulur
Sıklık: Değerin hangi sıklıkla kontrol edileceği (saniye).
Type | DataSourceModuleType |
Isolation | Any |
Accessibility | Public |
RunAs | Default |
OutputType | System.Discovery.Data |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
Scheduler | DataSource | System.CommandExecuterDiscoveryDataSource | Default |
ID | ParameterType | Selector | Display Name | Description |
---|---|---|---|---|
Frequency | int | $Config/Frequency$ | Sıklık | Değer örneği alma aralığı (saniye). |
<DataSourceModuleType ID="Microsoft.Windows.Server.DNS.Datasource" Accessibility="Public">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.Discovery.MapperSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Frequency" type="xsd:unsignedInt"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ClassId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.CommandExecuterDiscoveryDataSource">
<IntervalSeconds>$Config/Frequency$</IntervalSeconds>
<ApplicationName>%SystemRoot%\system32\cmd.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>/c $file/Main.cmd$</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>Main.cmd</Name>
<Contents>
@echo off
set psscript=DiscoverService.ps1
set vbscript=DiscoverService.vbs
set cscript=%windir%\system32\cscript.exe
set ps=%windir%\system32\WindowsPowerShell\v1.0\powershell.exe
set params=
if Exist "%cscript%" goto vb
if Exist "%ps%" goto pshell
goto end
:vb
if not exist "%~dp0%vbscript%" goto end
if exist "%~dp0vbparams.txt" (
set /p params=<"%~dp0vbparams.txt"
)
"%cscript%" /nologo "%~dp0%vbscript%" %params%
goto end
:pshell
if not exist "%~dp0%psscript%" goto end
if exist "%~dp0psparams.txt" (
set /p params=<"%~dp0psparams.txt"
)
"%ps%" -nologo -EP bypass -command "& '%~dp0%psscript%'" %params%
goto end
:end
</Contents>
<Unicode>false</Unicode>
</File>
<File>
<Name>DiscoverService.ps1</Name>
<Contents>
param($SourceId, $ManagedEntityId, $TargetComputer,$IsVirtual,$OsVersion)
Function Init-ScomHelper
{
$DiscHelper = @'
namespace SCOM.Helper
{
using System;
using System.Runtime.InteropServices;
public class ConvertData
{
public static string GetDataItemFromOutput(
Object oData)
{
NativeMethods.ISerialize discoverySerializer = null;
discoverySerializer = oData as NativeMethods.ISerialize;
string xmlString = null;
if (null != discoverySerializer)
{
int hr = discoverySerializer.SaveToString(out xmlString);
Marshal.ThrowExceptionForHR(hr);
}
return xmlString;
}
public static class NativeMethods
{
[Guid("A4E79E8A-9494-47A4-A280-8C7D35C88A2F"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISerialize
{
int SaveToString([MarshalAs(UnmanagedType.BStr)] out string output);
int LoadFromString([MarshalAs(UnmanagedType.BStr)] string input);
}
}
}
}
'@
$ErrorActionPreference = "SilentlyContinue"
$Error.Clear()
Add-Type $DiscHelper
$result = 0 -eq $Error.Count
return $result
}
#=================================
#Global Variables
##################################
$oAPI = $null
#====================================
# Log Constants
#=====================================
$DBG_NONE = 0
$DBG_ERROR = 1
$DBG_WARNING = 2
$DBG_TRACE = 4
$EventId = 5702
$Start_SnapShotDiscovery = 0
$Exit_SnapShotDiscovery = 1
$Exit_IncrementalDiscovery = 2
#=====================================
# String Constants
#=====================================
$ScriptName = "DiscoverService.ps1"
$StartParametersMsg = @"
Windows DNS Server Discovery
SourceId: {0} ManagedEntityId : {1} Target ComputerId : {2} IsVirtual : {3}
"@
$StartDiscoveryMsg = "Started DNS Server discovery at machine local time:"
$FinishDiscoveryMsg = "Finished dicovery at machine local time: "
$CreateDiscoveryDataErrorMsg = "Failed to get Discovery Data Object. MOM v3 must be installed to execute this script."
$InitApiErrorMsg = "Failed to get Discovery API. MOM v3 must be installed to execute this script. Error:{0}"
$InitScomSerApiErrorMsg = "Failed to Initialize SCOM Discovery Serialization API. MOM v3 must be installed to execute this script."
$ErrorStartParametersMsg = "Minimal list of parameters is empty. Exiting discovery. SourceId: {0} ManagedEntityId : {1} Target ComputerId : {2} "
#==========================================================================
# FUNCTIONS
#==========================================================================
Function DiscoverInstances
(
$SourceId
,$ManagedEntityId
,$TargetComputer
,$IsVirtual
)
{
$ErrorActionPreference = 'SilentlyContinue' # Scoped only to function
Log-DiscoveryMessage -message $StartDiscoveryMsg
$error.Clear()
$oDiscoveryData = $oAPI.CreateDiscoveryData(0, $SourceId, $ManagedEntityId)
If(0 -ne $error.Count -or [string]::IsNullOrEmpty($oDiscoveryData))
{
LogMessage $DBG_ERROR $CreateDiscoveryDataErrorMsg + " Error: " + $error[0].Exception.Message
return $null
}
$IsVirtual = Convert-ToBoolean -sBool $IsVirtual
If ($true -eq $IsVirtual)
{
$result = $Exit_SnapShotDiscovery
}
else
{
$error.Clear()
$dns = $null
$dns = Get-Service -Name "DNS" | where {$_.StartType -ne "Disabled"}
If ($null -eq $dns -or 0 -ne $error.Count )
{
$error.Clear()
$result = $Exit_SnapShotDiscovery
}
else
{
$result = Get-SnapshotDiscovery -OsVersion ([ref] $OsVersion)
}
}
if ($Exit_IncrementalDiscovery -eq $result)
{
$oDiscoveryData.IsSnapshot = $false
}
elseif($Start_SnapShotDiscovery -eq $result)
{
$error.Clear()
$emptyDiscoveryData = Get-EmptyDiscoveryData -SourceId $SourceId -ManagedEntityId $ManagedEntityId -IsSnapshot $false
$oClassInstance = $oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.Server.DNS.Server']$")
if ($null -eq $oClassInstance -or 0 -ne $error.Count)
{
$oDiscoveryData = $emptyDiscoveryData
}
else
{
$DisplayName = "Windows DNS Server on (" + $TargetComputer + ")"
$oClassInstance.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$",$TargetComputer)
$oClassInstance.AddProperty("$MPElement[Name='Microsoft.Windows.Server.DNS.Server']/Name$",$TargetComputer)
$oClassInstance.AddProperty("$MPElement[Name='Microsoft.Windows.Server.DNS.Server']/WindowsVersion$",$OsVersion)
$oClassInstance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$",$DisplayName)
if (0 -ne $error.Count)
{
$oDiscoveryData = $emptyDiscoveryData
}
else
{
$oDiscoveryData.AddInstance($oClassInstance)
if (0 -ne $error.Count)
{
$oDiscoveryData = $emptyDiscoveryData
}
}
}
}
Log-DiscoveryMessage -message $FinishDiscoveryMsg
return $oDiscoveryData
}
Function Convert-ToBoolean([string] $sBool)
{
[bool] $result = $false
[bool] $iresult = $false
if ($false -eq [string]::IsNullOrEmpty($sBool) )
{
$result = $sBool.Equals("true",[System.StringComparison]::InvariantCultureIgnoreCase)
$iresult = $sBool.Equals("1",[System.StringComparison]::InvariantCultureIgnoreCase)
$result = $result -or $iresult
}
return $result
}
function Get-EmptyDiscoveryData($SourceId, $ManagedEntityId,$IsSnapshot)
{
$ErrorActionPreference = 'SilentlyContinue' # Scoped only to function
$Error.Clear()
if ($null -eq $oAPI)
{
$oAPI = New-Object -ComObject "MOM.ScriptAPI"
if ($null -eq $oAPI)
{
return $null
}
}
$Error.Clear()
$oDiscoveryDataTmp= $oAPI.CreateDiscoveryData(0, $SourceId, $ManagedEntityId)
$oDiscoveryDataTmp.IsSnapshot = $IsSnapshot
$Error.Clear()
return $oDiscoveryDataTmp
}
Function Get-OsFilter([string]$OSVersion,[string]$delimiter=",")
{
$ErrorActionPreference = "SilentlyContinue"
$Error.Clear()
$Filter = "ProductType != 1"
if([string]::IsNullOrEmpty($OsVersion))
{
return $Filter
}
$prefix = " and (Version like '"
$separator = "%' or Version like '"
$EndClause = "%')"
$OsVersions = $OSVersion.Split($delimiter,[StringSplitOptions]::RemoveEmptyEntries)
if ($OsVersions.Count -eq 0 -or $null -eq $OsVersions )
{
return $Filter
}
$SubFilter = [string]::Join($separator,$OsVersions)
$Filter = $Filter + $prefix + $SubFilter + $EndClause
return $Filter
}
Function Get-SnapshotDiscovery([ref]$OsVersion)
{
$ErrorActionPreference = "SilentlyContinue"
if([string]::IsNullOrEmpty($OsVersion.Value))
{
return $Start_SnapShotDiscovery
}
$Filter = Get-OsFilter -OSVersion $OsVersion
$Error.Clear()
$result = Get-WmiObject -Class "Win32_OperatingSystem" -Property ("Version") -Filter $Filter
if(0 -ne $Error.Count)
{
$Error.Clear()
$result = Load-Module "cimcmdlets"
if ($false -eq $result)
{
$Error.Clear()
return $Exit_IncrementalDiscovery
}
try
{
$cimSessionOption = New-CimSessionOption -Protocol DCOM
$cimsession = New-CimSession -SessionOption $cimSessionOption
$result = Get-CimInstance -CimSession $cimsession -ClassName "Win32_OperatingSystem" -Property ("Version") -Filter $Filter
}
catch
{
$result = Get-WMIObject -ClassName "Win32_OperatingSystem" -Property ("Version") -Filter $Filter
}
Finally
{
Get-CimSession | Remove-CimSession
$cimsession =$null
$cimSessionOption = $null
}
if (0 -ne $Error.Count)
{
return $Exit_IncrementalDiscovery
}
}
if ($null -eq $result)
{
$result = $Exit_SnapShotDiscovery
}
else
{
$OsVersion.Value = $result.Version
$result = $Start_SnapShotDiscovery
}
return $result
}
Function Log-DiscoveryMessage([string]$message)
{
$ErrorActionPreference = 'SilentlyContinue' # Scoped only to function
$timex=get-date -displayhint time
$message = $message +" " + $timex
LogMessage $DBG_TRACE $message
}
#======================================================================
# Method: LogMessage
# Description: Log a debug message to ScriptContext
# Parameters:
# nLevel - Debug level for the message that
# we're logging.
# strMessage - The message to write to the trace.
#======================================================================
Function LogMessage($nLevel, $strMessage,$LogId = $EventId)
{
$ErrorActionPreference = 'SilentlyContinue' # Scoped only to function
if($nLevel -eq $DBG_ERROR)
{
Write-Host "[Error]: " $strMessage;
}elseif ($nLevel -eq $DBG_WARNING)
{
Write-Host "[Warning]: " $strMessage;
} elseif ($nLevel -eq $DBG_TRACE)
{
Write-Host "[Trace]: " $strMessage;
}
else
{
Write-Host $strMessage
}
$Error.Clear()
if ($null -eq $oAPI)
{
$oAPI = New-Object -ComObject "MOM.ScriptAPI"
if ($null -eq $oAPI)
{
return $null
}
}
if ($null -eq $LogId)
{
$LogId = 5702
}
$oAPI.LogScriptEvent($ScriptName,$LogId,$nLevel,$Message)
}
#==========================================================================
# Initialize the arguments in Script
#==========================================================================
Function Initialize-DiscoveryScript
(
[ref]$oAPI
)
{
$ErrorActionPreference = 'SilentlyContinue' # Scoped only to function
$error.Clear()
$oAPI.Value = New-object -ComObject "MOM.ScriptAPI"
if ([string]::IsNullOrEmpty($oAPI.Value) -or 0 -ne $error.Count)
{
exit -1
}
$result = Init-ScomHelper
if ($false -eq $result)
{
exit -1
}
}
Function Load-Module ([string] $ModuleName)
{
$ErrorActionPreference="SilentlyContinue"
$error.Clear()
$retval = $false
if ([string]::IsNullOrEmpty($ModuleName) )
{
return $retval
}
$error.Clear()
$cim = Get-Module -Name $ModuleName
########Check for powershell 1.0
if ($error.Count -ne 0)
{
if ($null -eq $error[0].Exception)
{
$error.Clear()
return $retval
}
$type = $error[0].Exception.GetType()
if ([System.Management.Automation.CommandNotFoundException] -eq $type)
{
$error.Clear()
return $retval
}
$error.Clear()
}
if ($null -eq $cim)
{
Import-Module $ModuleName
if ($error.Count -eq 0)
{
$retval = $true
}
$error.Clear()
}
else
{
$retval = $true
}
return $retval
}
Function Log-StartParameters
{
$message = $StartParametersMsg -f ($SourceId,$ManagedEntityId,$TargetComputer,$IsVirtual)
LogMessage $DBG_TRACE $message
If ([string]::IsNullOrEmpty($SourceId) -or [string]::IsNullOrEmpty($ManagedEntityId) -or [string]::IsNullOrEmpty($TargetComputer))
{
$message = $ErrorStartParametersMsg -f ($SourceId,$ManagedEntityId,$TargetComputer)
LogMessage $DBG_ERROR $message
exit -1
}
}
#==========================================================================
# Main
#==========================================================================
$ErrorActionPreference = "SilentlyContinue"
Initialize-DiscoveryScript -oAPI ([ref] $oAPI)
Log-StartParameters
$discoveryData = DiscoverInstances -SourceId $SourceId -ManagedEntityId $ManagedEntityId -TargetComputer $TargetComputer -IsVirtual $IsVirtual
if ($null -ne $discoveryData)
{
$SerializeDiscoveryData = [Scom.Helper.ConvertData]::GetDataItemFromOutput($discoveryData)
Write-Host "$SerializeDiscoveryData"
}
</Contents>
<Unicode>true</Unicode>
</File>
<File>
<Name>DiscoverService.vbs</Name>
<Contents>
Option Explicit
SetLocale("en-us")
Const Start_SnapShotDiscovery = 0
Const Exit_SnapShotDiscovery = 1
Const Exit_IncrementalDiscovery = 2
Const ServiceKey = "HKLM\SYSTEM\CurrentControlSet\Services\"
Const StartTypeAuto = 2
Const StartTypeManual = 3
Const StartTypeDisabled = 4
Const DnsServiceName = "DNS"
Const DnsClassId = "$MPElement[Name='Microsoft.Windows.Server.DNS.Server']$"
Const EventId = 5702
Const ScriptName = "DiscoverDnsService.vbs"
Call Main
Sub Main()
On Error Resume Next
Err.Clear
Dim oAPI, oDiscoveryData
Dim SourceId, ManagedEntityId, TargetComputer, IsVirtualNode
Dim result
Dim message
Dim OsVersionFilter
result = False
Set oAPI = CreateObject("MOM.ScriptAPI")
If(0 <> Err.number or (False = HasValue(oAPI)) ) Then
WScript.Quit(-1)
End If
result = GetArguments(SourceId,ManagedEntityId,TargetComputer,IsVirtualNode,OsVersionFilter)
If(False = result) Then
message = "Wrong number of Arguments."
Call oAPI.LogScriptEvent(ScriptName,EventId,1,message)
WScript.Quit(-1)
End If
Set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
If(0 <> Err.number or (False = HasValue(oDiscoveryData)) ) Then
WScript.Quit(-1)
End If
If ("TRUE" = IsVirtualNode) Then
Call oAPI.Return(oDiscoveryData)
Set oDiscoveryData = Nothing
Set oAPI = Nothing
Exit Sub
End If
result = DiscoverInstances(DnsClassId,OsVersionFilter,DnsServiceName ,TargetComputer,oDiscoveryData)
If(False = result) Then
Set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
If(0 <> Err.number or (False = HasValue(oDiscoveryData)) ) Then
WScript.Quit(-1)
End If
oDiscoveryData.IsSnapShot = False
End If
Call oAPI.Return(oDiscoveryData)
Set oDiscoveryData = Nothing
Set oAPI = Nothing
End Sub
Function HasValue(Value)
Dim bNothing
bNothing = false
IF ( IsObject(Value) ) THEN
IF (Nothing is Value) THEN
bNothing = true
END IF
END IF
HasValue = Not ( IsEmpty(Value) or bNothing or IsNull(Value) )
End Function
Function GetArguments(ByRef SourceId,ByRef ManagedEntityId,ByRef TargetComputer,ByRef IsVirtualNode,ByRef OsVersionFilter)
On Error Resume Next
Err.Clear
Dim objArguments
GetArguments = False
Set objArguments = WScript.Arguments
If (objArguments.Count < 3) Then
Exit Function
End If
Set objArguments = WScript.Arguments
SourceId = Replace(objArguments(0), Chr(34), "")
ManagedEntityId = Replace(objArguments(1), Chr(34), "")
TargetComputer = Replace(objArguments(2), Chr(34), "")
IsVirtualNode = ""
OsVersionFilter = objArguments(4)
If (objArguments.Count > 3) Then
IsVirtualNode = UCase(Replace(objArguments(3), Chr(34), ""))
End If
Set objArguments = Nothing
GetArguments = True
On Error Goto 0
End Function
Function DiscoverInstances(ClassId,OsVersion,ServiceName,TargetComputer,oDiscoveryData)
Dim DisplayName
Dim OsVersionName
On Error Resume Next
Err.Clear
Dim result, oClassInstance
DiscoverInstances = True
OsVersionName = OsVersion
result = GetSnapshotDiscovery(OsVersionName,ServiceName)
If (Exit_IncrementalDiscovery = result) Then
oDiscoveryData.IsSnapshot = false
ElseIf(Start_SnapShotDiscovery = result) Then
Set oClassInstance = oDiscoveryData.CreateClassInstance(ClassId)
If (0 <> Err.number) Then
DiscoverInstances = False
Exit Function
End If
DisplayName = "Windows DNS Server on (" & TargetComputer & ")"
Call oClassInstance.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$",TargetComputer)
Call oClassInstance.AddProperty("$MPElement[Name='Microsoft.Windows.Server.DNS.Server']/Name$",TargetComputer)
Call oClassInstance.AddProperty("$MPElement[Name='Microsoft.Windows.Server.DNS.Server']/WindowsVersion$",OsVersionName)
Call oClassInstance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$",DisplayName)
If (0 <> Err.number) Then
DiscoverInstances = False
Exit Function
End If
Call oDiscoveryData.AddInstance(oClassInstance)
DiscoverInstances = (0 = Err.number)
End If
On Error Goto 0
End Function
Function WMIExecQueryNoAbort(ByVal sNamespace, ByVal sQuery)
Dim oWMI, oQuery,Count
Set oWMI = GetObject(sNamespace)
Set oQuery = oWMI.ExecQuery(sQuery)
Set WMIExecQueryNoAbort = oQuery
End Function
Function GetOsFilter(OSVersion,delimiter)
On Error Resume Next
Err.Clear
Dim Filter,Prefix,Separator,EndClause
Dim OsVersions,SubFilter
Filter = " where ProductType != 1"
GetOSFilter = Filter
If (Not HasValue(OSVersion) or 0 = Len(OSVersion)) Then
Exit Function
End If
If (Not HasValue(delimiter)) Then
delimiter = ","
End If
If (delimiter = OSVersion) Then
Exit Function
End If
Prefix = " and (Version like '"
Separator = "%' or Version like '"
EndClause = "%')"
OsVersions = Split(OSVersion,delimiter)
SubFilter = Join(OsVersions,Separator)
Filter = Filter & Prefix & SubFilter & EndClause
GetOSFilter = Filter
On Error Goto 0
End Function
Function GetServerOsVersionCheck(sComputerName,ByRef OsVersion,ByRef IsError)
On Error Resume Next
Err.Clear
Dim strQuery,oWmiSet, sWmiTarget, Count, Filter, oObject
IsError = False
GetServerOsVersionCheck = False
If ( IsObject(OsVersion)) Then
Exit Function
End If
sWmiTarget = "."
If ( Not IsObject(sComputerName)) Then
If (HasValue(sComputerName) and Len(sComputerName) > 0 ) Then
sWmiTarget = "" & sComputerName
End If
End If
sWmiTarget = "winmgmts:\\" & sWmiTarget & "\root\cimv2"
Filter = GetOsFilter(OsVersion,",")
StrQuery = "select Version from Win32_OperatingSystem" + Filter
Set oWmiSet = WMIExecQueryNoAbort(sWmiTarget, strQuery)
If Err.Number <> 0 Then
IsError = True
Exit Function
End If
Count = oWmiSet.Count
If Err.Number <> 0 Then
IsError = True
Exit Function
End If
For Each oObject in oWmiSet
OsVersion = oObject.Version
Exit For
Next
Set oObject = Nothing
GetServerOsVersionCheck = ( Count > 0)
On Error Goto 0
End Function
Function GetSnapshotDiscovery(ByRef OsVersion,ServiceName)
Dim bIsOsValid,bIsError,iResult,bIsService
On Error Resume Next
bIsOsValid = GetServerOsVersionCheck(".",OsVersion,bIsError)
bIsService = CheckServiceStartType(ServiceName)
If (bIsOsValid) Then
If (bIsService) Then
iResult = Start_SnapShotDiscovery
Else
iResult = Exit_SnapShotDiscovery
End If
Else
If (bIsError) Then
iResult = Exit_IncrementalDiscovery
Else
iResult = Exit_SnapShotDiscovery
End IF
End If
GetSnapshotDiscovery = iResult
End Function
Function GetRegistryKeyValue(ByVal keyPath, ByVal key)
Dim oReg, strKeyValue
On Error Resume Next
strKeyValue = ""
Set oReg = CreateObject("WScript.Shell")
If Err.Number <> 0 Then
GetRegistryKeyValue = strKeyValue
On Error Goto 0
Exit Function
End If
strKeyValue = oReg.RegRead(keyPath & key)
If Err.Number <> 0 Then
strKeyValue = ""
End If
' resume error
On Error Goto 0
GetRegistryKeyValue = strKeyValue
End Function
Function GetServiceStartType(ServiceName)
Dim ServiceRegKey,RegValue
Dim Value
GetServiceStartType = -1
On Error Resume Next
RegValue = "Start"
ServiceRegKey = ServiceKey & ServiceName & "\"
Value = GetRegistryKeyValue(ServiceRegKey, RegValue)
If (0 = Len(Value) ) Then
Value = -1
End If
GetServiceStartType = Value
' resume error
On Error Goto 0
End Function
Function CheckServiceStartType(ServiceName)
Dim ServiceValue
Dim Value
CheckServiceStartType = False
On Error Resume Next
ServiceValue = GetServiceStartType(ServiceName)
If ( (-1 = ServiceValue) Or ("-1" = ServiceValue) ) Then
Exit Function
End If
If (StartTypeDisabled <> ServiceValue) Then
CheckServiceStartType = True
End If
' resume error
On Error Goto 0
End Function
</Contents>
<Unicode>false</Unicode>
</File>
<File>
<Name>vbparams.txt</Name>
<Contents> "$MPElement$" "$Target/Id$" "$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$" "$Target/Property[Type="Windows!Microsoft.Windows.Server.Computer"]/IsVirtualNode$" "6.2.,6.3." </Contents>
<Unicode>false</Unicode>
</File>
<File>
<Name>psparams.txt</Name>
<Contents> '$MPElement$' '$Target/Id$' '$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$' '$Target/Property[Type="Windows!Microsoft.Windows.Server.Computer"]/IsVirtualNode$' '6.2.,6.3.' </Contents>
<Unicode>false</Unicode>
</File>
</Files>
</DataSource>
</MemberModules>
<Composition>
<Node ID="Scheduler"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>