Обнаружить отношение вложения роли файловых служб

Microsoft.Windows.FileServices.Service.iSCSITarget.6.3.Relationship.Discovery (Discovery)

Обнаруживает отношение вложения между ролью файловых служб и объектом цели iSCSI, обнаруженным на этом сервере

Knowledge Base article:

Краткое описание

Это правило обнаружения обнаруживает отношение вложения между ролью файловых служб и службой цели iSCSI, если она существует. Это правило предназначено для службы цели iSCSI. Оно будет запущено только в случае ее обнаружения. Служба цели iSCSI предоставляется в рамках выпуска Windows Server 2012 R2.

Element properties:

TargetMicrosoft.Windows.FileServices.Service.iSCSITarget.6.3
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered relationships and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.TimedScript.DiscoveryProvider Default

Source Code:

<Discovery ID="Microsoft.Windows.FileServices.Service.iSCSITarget.6.3.Relationship.Discovery" Enabled="true" Target="Microsoft.Windows.FileServices.Service.iSCSITarget.6.3" Remotable="true">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryRelationship TypeID="FileServices!Microsoft.Windows.FileServer.Contains.Service"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ScriptName>iSCSI62R2.DiscoverRelationship.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Arguments>
<ScriptBody><Script>

Option Explicit
SetLocale("en-us")

Dim oAPI, oArgs
Set oAPI = CreateObject("MOM.ScriptAPI")

Set oArgs = WScript.Arguments
if oArgs.Count &lt; 3 Then
oApi.LogScriptEvent "iSCSI62.DiscoverRelationship",1,4,"Not enough arguments"
Wscript.Quit -1
End If

Dim SourceID, ManagedEntityId, TargetComputer, IsVirtualNode

SourceId = oArgs(0)
ManagedEntityId = oArgs(1)
TargetComputer = oArgs(2)

Dim oDiscoveryData, oInst, oRel, OInstFs

set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)

Dim oWmiInst, oServerFeature

set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.FileServices.Service.iSCSITarget.6.3']$")

call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)

set oInstFs = oDiscoveryData.CreateClassInstance("$MPElement[Name='FileServices63!Microsoft.Windows.FileServices.6.3.FileServer']$")
call oInstFs.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)

Set oRel = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='FileServices!Microsoft.Windows.FileServer.Contains.Service']$")
oRel.Source = oInstFs
oRel.Target = oInst
Call oDiscoveryData.AddInstance(oRel)


Call oAPI.Return(oDiscoveryData)


</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>