Ez az objektum a DFS replikációs szolgáltatás konfigurációs információit fedezi fel Windows Server 2012 R2 operációs rendszert futtató számítógépeken.
Ez az objektum a DFS replikációs szolgáltatás konfigurációs információit fedezi fel Windows Server 2012 R2 operációs rendszert futtató számítógépeken. Ezt a DFSRServiceDiscovery63.vbs parancsfájl futtatásával teszi, ami lekérdezi a DfsrMachineConfig WMI osztályból a következőket is tartalmazó konfigurációs beállításokat:
Szolgáltatás állapota
Hibakereső naplók helye
Ütköző és törölt alacsony küszöbérték beállítása
Ütköző és törölt magas küszöbérték beállítása
Átmeneti terület alacsony küszöbérték beállítása
Átmeneti terület magas küszöbérték beállítása
Az Operations Manager szerzői vagy rendszergazdai engedéllyel rendelkező felhasználói a felülbírálások segítségével a következő paramétereket módosíthatják:
Az IntervalSeconds azt vezérli, hogy az Operations Manager milyen gyakran futtatja a felderítési folyamatot.
A Timeoutseconds azt vezérli, hogy a rendszer mennyi ideig várakozzon a felderítés befejezésére.
DfsrMachineConfig WMI osztály az MSDN webhelyen (http://go.microsoft.com/fwlink/?LinkID=165542)
Figyelő felülírása (http://go.microsoft.com/fwlink/?LinkId=171027)
Target | Microsoft.Windows.FileServer.DFSR.6.3.Service |
Enabled | True |
Frequency | 14400 |
Remotable | False |
Discovered Classes and their attribuets: |
---|
|
Discovered relationships and their attribuets: |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
Microsoft.Windows.TimedScript.DiscoveryProvider | DataSource | Microsoft.Windows.TimedScript.DiscoveryProvider | Microsoft.Windows.FileServer.DFSR.MonitoringAccount |
<Discovery ID="Microsoft.Windows.FileServer.DFSR.6.3.ServiceDiscovery" Enabled="true" Target="Microsoft.Windows.FileServer.DFSR.6.3.Service" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.FileServer.DFSR.6.3.Service">
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="State"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="DebugLogFilePath"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="ConflictHighWatermarkPercent"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="ConflictLowWatermarkPercent"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="StagingHighWatermarkPercent"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="StagingLowWatermarkPercent"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="IsRoDriverLoaded"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service" PropertyID="IsVirtualNode"/>
</DiscoveryClass>
<DiscoveryClass TypeID="Microsoft.Windows.FileServer.DFSR.6.3.RoleService">
<Property TypeID="Microsoft.Windows.FileServer.DFSR.6.3.RoleService" PropertyID="IsVirtualNode"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
<DiscoveryClass TypeID="Microsoft.Windows.FileServer.DFSR.6.3.ReadOnlyFilterDriver">
<Property TypeID="Microsoft.Windows.FileServer.DFSR.6.3.ReadOnlyFilterDriver" PropertyID="DriverLoaded"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
<DiscoveryClass TypeID="FileServices63!Microsoft.Windows.FileServices.6.3.FileServer">
<Property TypeID="FileServices!Microsoft.Windows.FileServer" PropertyID="IsOnVirtualNode"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
<DiscoveryRelationship TypeID="Microsoft.Windows.FileServer.DFSR.6.3.RoleServiceContainsService"/>
<DiscoveryRelationship TypeID="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service.Contains.ServerExtensions"/>
<DiscoveryRelationship TypeID="FileServices!Microsoft.Windows.FileServer.Contains.Service"/>
</DiscoveryTypes>
<DataSource ID="Microsoft.Windows.TimedScript.DiscoveryProvider" RunAs="DFSRLib!Microsoft.Windows.FileServer.DFSR.MonitoringAccount" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ScriptName>DFSRServiceDiscovery63.vbs</ScriptName>
<Arguments>0 $MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$ $Target/Property[Type="DFSRLib!Microsoft.Windows.FileServer.DFSR.Service"]/IsVirtualNode$</Arguments>
<ScriptBody> Option Explicit
On Error Resume Next
Dim SourceType, SourceID, ManagedEntityId, oArgs, oAPI, sDfsrServerName, isVirtualNode, isRoDriverLoaded
SetLocale("en-us")
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oArgs = WScript.Arguments
if oArgs.Count < 4 Then
call oAPI.LogScriptEvent("DFSRServiceDiscovery63.vbs", 100, 1, "Expected 4 or 5 arguments. There were only " & oArgs.Count & " arguments. Exiting script.")
Wscript.Quit -1
End If
Dim oDiscData, oDfsService, oServiceConfig, oDfsrInfo, StateStr, oServiceConfigCollection, oDfsrInfoCollection, oDfsrConfig, oDfsrConfigCollection
Dim CurrentTime, colItems, objItem, numUptMins, numUptHour, strMsg, numUptime, serviceState
SourceType = oArgs(0)
SourceId = oArgs(1)
ManagedEntityId = oArgs(2)
sDfsrServerName = oArgs(3)
if oArgs.Count = 5 then
isVirtualNode = oArgs(4)
else
isVirtualNode = "False"
end if
isRoDriverLoaded = "False"
serviceState = "NOT KNOWN"
set oDiscData = oAPI.CreateDiscoveryData(SourceType, SourceId, ManagedEntityId)
Dim oDfsrSvc, oSvcCollection, objWMIService, oServiceWMI
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sDfsrServerName & "\root\cimv2")
if Err.Number <> 0 then
strErr = "Unable to connect to local cimv2 WMI provider. Error: 0x" & Hex(Err.Number) & " " & Err.Description
WScript.Echo strErr
Wscript.Quit -1
End If
Set oSvcCollection = objWMIService.ExecQuery ("Select State from Win32_service Where Name = 'DFSR'")
if Err.Number <> 0 then
strErr = "Unable to query Win32_service from local cimv2 WMI provider. Error: 0x" & Hex(Err.Number) & " " & Err.Description
WScript.Echo strErr
Wscript.Quit -1
End If
set oDfsService = oDiscData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.Service']$")
call oDfsService.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sDfsrServerName)
call oDfsService.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", Left(sDfsrServerName, InStr(sDfsrServerName, ".")-1))
if (oArgs.Count = 5) then
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/IsVirtualNode$", isVirtualNode)
End If
Dim objShell, objScriptExec
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("sc " & "\\" & sDfsrServerName & " query dfsrro")
Do While objScriptExec.StdOut.AtEndOfStream <> True
if InStr(objScriptExec.StdOut.ReadLine, "RUNNING ") > 0 then
isRoDriverLoaded = "True"
Exit Do
end if
loop
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/IsRoDriverLoaded$", isRoDriverLoaded)
for each oDfsrSvc in oSvcCollection
serviceState = UCase(oDfsrSvc.State)
Next
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/State$", serviceState)
If serviceState = "RUNNING" Then
Set oServiceWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sDfsrServerName & "\root\microsoftdfs")
if Err.Number <> 0 then
strErr = "Unable to connect to local DFSR WMI provider. Error: 0x" & Hex(Err.Number) & " " & Err.Description
WScript.Echo strErr
Wscript.Quit -1
End If
Set oServiceConfigCollection = oServiceWMI.ExecQuery ("Select ConflictHighWatermarkPercent, ConflictLowWatermarkPercent, StagingHighWatermarkPercent, StagingLowWatermarkPercent, DebugLogFilePath from DfsrMachineConfig")
if Err.Number <> 0 then
strErr = "Unable to query DfsrMachineConfig from local DFSR WMI provider. Error: 0x" & Hex(Err.Number) & " " & Err.Description
WScript.Echo strErr
Wscript.Quit -1
End If
for each oServiceConfig in oServiceConfigCollection
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/ConflictHighWatermarkPercent$", oServiceConfig.ConflictHighWatermarkPercent)
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/ConflictLowWatermarkPercent$", oServiceConfig.ConflictLowWatermarkPercent)
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/StagingHighWatermarkPercent$", oServiceConfig.StagingHighWatermarkPercent)
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/StagingLowWatermarkPercent$", oServiceConfig.StagingLowWatermarkPercent)
call oDfsService.AddProperty("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service']/DebugLogFilePath$", oServiceConfig.DebugLogFilePath)
Exit For
Next
End If
Call oDiscData.AddInstance(oDfsService)
Dim oDfsrServerRoleObj, oRel, oDfsrRoObj, oRelRo, oInstFs, oRelFS
set oDfsrServerRoleObj = oDiscData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.RoleService']$")
call oDfsrServerRoleObj.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sDfsrServerName)
if (oArgs.Count = 5) then
call oDfsrServerRoleObj.AddProperty("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.RoleService']/IsVirtualNode$", isVirtualNode)
End If
call oDfsrServerRoleObj.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", Left(sDfsrServerName, InStr(sDfsrServerName, ".")-1))
Call oDiscData.AddInstance(oDfsrServerRoleObj)
Set oRel = oDiscData.CreateRelationshipInstance("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.RoleServiceContainsService']$")
oRel.Source = oDfsrServerRoleObj
oRel.Target = oDfsService
Call oDiscData.AddInstance(oRel)
set oInstFs = oDiscData.CreateClassInstance("$MPElement[Name='FileServices63!Microsoft.Windows.FileServices.6.3.FileServer']$")
call oInstFs.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sDfsrServerName)
call oInstFs.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", Left(sDfsrServerName, InStr(sDfsrServerName, ".")-1))
if (oArgs.Count = 5) then
call oInstFs.AddProperty("$MPElement[Name='FileServices!Microsoft.Windows.FileServer']/IsOnVirtualNode$", isVirtualNode)
End If
call oDiscData.AddInstance(oInstFs)
Set oRelFS = oDiscData.CreateRelationshipInstance("$MPElement[Name='FileServices!Microsoft.Windows.FileServer.Contains.Service']$")
oRelFS.Source = oInstFs
oRelFS.Target = oDfsrServerRoleObj
Call oDiscData.AddInstance(oRelFS)
set oDfsrRoObj = oDiscData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.ReadOnlyFilterDriver']$")
call oDfsrRoObj.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sDfsrServerName)
call oDfsrRoObj.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", Left(sDfsrServerName, InStr(sDfsrServerName, ".")-1))
call oDfsrRoObj.AddProperty("$MPElement[Name='Microsoft.Windows.FileServer.DFSR.6.3.ReadOnlyFilterDriver']/DriverLoaded$", isRoDriverLoaded)
Call oDiscData.AddInstance(oDfsrRoObj)
Set oRelRo = oDiscData.CreateRelationshipInstance("$MPElement[Name='DFSRLib!Microsoft.Windows.FileServer.DFSR.Service.Contains.ServerExtensions']$")
oRelRo.Source = oDfsService
oRelRo.Target = oDfsrRoObj
Call oDiscData.AddInstance(oRelRo)
Call oAPI.Return(oDiscData) </ScriptBody>
<TimeoutSeconds>900</TimeoutSeconds>
</DataSource>
</Discovery>