FPSP Antimalware Engine Discovery

Microsoft.ForefrontProtection.FPSP.AVEngines.Discovery (Discovery)

Discovery of a Microsoft Forefront Protection 2010 for SharePoint antimalware engine

Knowledge Base article:

Summary

Discovery of antimalware engines.

Element properties:

TargetMicrosoft.ForefrontProtection.FPSP.Engines
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

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

Source Code:

<Discovery ID="Microsoft.ForefrontProtection.FPSP.AVEngines.Discovery" Enabled="true" Target="Microsoft.ForefrontProtection.FPSP.Engines" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.ForefrontProtection.FPSP.AVEngines">
<Property TypeID="FSS!Microsoft.ForefrontProtection.Library.Server" PropertyID="ServerName"/>
<Property TypeID="FSS!Microsoft.ForefrontProtection.Library.AVEngines" PropertyID="EngineName"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ScriptName>FSSPAVEnginesDiscovery.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</Arguments>
<ScriptBody><Script>
SetLocale("en-us")
Const EVENT_TYPE_ERROR=1
Const EVENT_TYPE_WARNING=2
Const EVENT_TYPE_SUCCESS=4

Dim oAPI
Set oAPI = CreateObject("MOM.ScriptAPI")
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10161, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of creating oAPI object")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10162, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of creating oAPI object")
End if

Dim oArgs
Set oArgs = WScript.Arguments
SourceId = oArgs(0)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10163, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of getting SourceID")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10164, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of getting SourceID")
End if

ManagedEntityId = oArgs(1)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10165, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of getting ManagedEntityId")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10166, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of getting ManagedEntityId")
End if

TargetComputer = oArgs(2)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10167, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of getting TargetComputer")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10168, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of getting TargetComputer")
End if

Dim oDiscoveryData
set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10169, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of creating oDiscoveryData object")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10170, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of creating oDiscoveryData object")
End if

Dim oInstance
Set oInstance = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.ForefrontProtection.FPSP.AVEngines']$")
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10171, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of creating oInstance object")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10172, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of creating oInstance object")
End if

Call oInstance.AddProperty("$MPElement[Name='FSS!Microsoft.ForefrontProtection.Library.Server']/ServerName$",TargetComputer)

Call oInstance.AddProperty("$MPElement[Name='FSS!Microsoft.ForefrontProtection.Library.AVEngines']/EngineName$","FSSP AVEngines")

Call oInstance.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$",TargetComputer)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10173, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of adding PrincipalName property")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10174, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of adding PrincipalName property")
End if

Call oInstance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$","Antimalware Engines")
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10175, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of adding DisplayName property")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10176, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of adding DisplayName property")
End if

Call oDiscoveryData.AddInstance(oInstance)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10177, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of adding Instance")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10178, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of adding Instance")
End if

Call oAPI.Return(oDiscoveryData)
If Err&lt;&gt;0 Then
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10179, EVENT_TYPE_ERROR, "FSSPAVEnginesDiscovery.vbs: Error of returning")
Quit
Else
Call oAPI.LogScriptEvent("FSSPAVEnginesDiscovery.vbs", 10180, EVENT_TYPE_SUCCESS, "FSSPAVEnginesDiscovery.vbs: Success of returning")
End if</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>