Fax Services 2008 Device Discovery

Microsoft.Windows.Server.2008.FaxServer.FaxDevice.Discovery (Discovery)

Discovers all Fax Services 2008 Devices

Knowledge Base article:

Summary

Discovers all Fax Services 2008 Devices

Element properties:

TargetMicrosoft.Windows.Server.2008.FaxServerRole
EnabledTrue
Frequency300
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.TimedScript.DiscoveryProvider Microsoft.Windows.Server.FaxServer.Library.ActionAccount

Source Code:

<Discovery ID="Microsoft.Windows.Server.2008.FaxServer.FaxDevice.Discovery" Enabled="true" Target="Microsoft.Windows.Server.2008.FaxServerRole" ConfirmDelivery="false" Remotable="false" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.Server.2008.FaxServer.FaxDevice">
<Property PropertyID="ID"/>
<Property PropertyID="CSID"/>
<Property PropertyID="Description"/>
<Property PropertyID="DeviceName"/>
<Property PropertyID="PoweredOff"/>
<Property PropertyID="ProviderUniqueName"/>
<Property PropertyID="ReceiveMode"/>
<Property PropertyID="ReceivingNow"/>
<Property PropertyID="RingingNow"/>
<Property PropertyID="SendEnabled"/>
<Property PropertyID="SendingNow"/>
<Property PropertyID="TSID"/>
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider" RunAs="FSLIB!Microsoft.Windows.Server.FaxServer.Library.ActionAccount">
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<ScriptName>FaxDevice.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</Arguments>
<ScriptBody><Script>
Dim oAPI
Set oAPI = CreateObject("MOM.ScriptAPI")

Dim oArgs
Set oArgs = WScript.Arguments
if oArgs.Count &lt;&gt; 4 Then
Wscript.Quit -1
End If

Dim sourceId, managedEntityId, serverName, displayName
sourceId = oArgs(0)
managedEntityId = oArgs(1)
serverName = oArgs(2)
displayName = oArgs(3)

Dim oData, oClass
Set oData = oAPI.CreateDiscoveryData(0, sourceId, managedEntityId)

Dim oFaxServer, colDevices
Set oFaxServer = CreateObject("FaxComEx.FaxServer")
if IsNull(oFaxServer) = false then
oFaxServer.Connect displayName
Set colDevices = oFaxServer.GetDevices()
if IsNull(colDevices) = false then
For Each oFaxDevice in colDevices
Set oClass = oData.CreateClassInstance("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']$")
call oClass.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", oFaxDevice.DeviceName)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/ID$", oFaxDevice.ID)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/CSID$", oFaxDevice.CSID)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/Description$", oFaxDevice.Description)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/DeviceName$", oFaxDevice.DeviceName)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/PoweredOff$", oFaxDevice.PoweredOff)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/ProviderUniqueName$", oFaxDevice.ProviderUniqueName)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/ReceiveMode$", oFaxDevice.ReceiveMode)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/ReceivingNow$", oFaxDevice.ReceivingNow)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/RingingNow$", oFaxDevice.RingingNow)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/SendEnabled$", oFaxDevice.SendEnabled)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/SendingNow$", oFaxDevice.SendingNow)
call oClass.AddProperty("$MPElement[Name='Microsoft.Windows.Server.2008.FaxServer.FaxDevice']/TSID$", oFaxDevice.TSID)

Call oClass.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", serverName) 'Inform SCOM of which object to host fax on
call oData.AddInstance(oClass)
Next
end if
end if

Call oAPI.Return(oData)
WScript.Quit
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>