Probe Module: IsFeatureInstalled

Applies To: Operations Manager 2007, System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager, Windows Server 2012, Windows Server 2012 R2

The Microsoft.Windows.Server.IsFeatureInstalled.Probe checks whether a specified feature is installed on a computer running the Windows Server 2008 or later server operating system. This module can be used by developers who need to discover features installed.

Module

ID

Microsoft.Windows.Server.IsFeatureInstalled.Probe

Type

ProbeActionModuleType

MP

Microsoft.Windows.Server.Library

RunAs

System.PrivilegedManagementAccount

Accessibility

Public

Input (Configuration)

Name Type Description Overrideable

TimeoutSeconds

int

Timeout (seconds)

No

TargetComputerName

string

Target computer name

No

ServerFeature

string

Server component ID or name.

The possible values of the ServerFeature property correspond to values of the ID or Name property of the WMI class Win32_ServerFeature (https://go.microsoft.com/fwlink/?LinkId=119210). If ServerFeature is a valid integer, then the module will try to search for a particular feature/role by ID first, and then by Name.

Important

Win32_ServerFeature::Name does not correspond to a description field provided in documentation for Win32_ServerFeature::ID. One way to determine the actual name is to run servermanagercmd.exe -q and find the name in the output. There is also a risk that Win32_ServerFeature::Name is subject to change without any notice in future operating system versions.

No

Example Code

The following discovery and data source module type discovers Fax Server (ID = 5) on Windows Server 2008:

<DataSourceModuleType ID="Windows.Fax.Server.Discovery.DataSource" RunAs="System!System.PrivilegedMonitoringAccount" Accessibility="Internal">

<Configuration>

<xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:unsignedInt" />

<xsd:element minOccurs="1" name="TimeoutSeconds" type="xsd:unsignedInt" />

</Configuration>

<OverrideableParameters>

<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />

<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />

</OverrideableParameters>

<ModuleImplementation Isolation="Any">

<Composite>

<MemberModules>

<DataSource ID="Scheduler" TypeID="System!System.Discovery.Scheduler">

<Scheduler>

<SimpleReccuringSchedule>

<Interval Unit="Seconds">$Config/IntervalSeconds$</Interval>

</SimpleReccuringSchedule>

<ExcludeDates />

</Scheduler>

</DataSource>

<ProbeAction ID="Probe" TypeID="WindowsServer!Microsoft.Windows.Server.IsFeatureInstalled.Probe">

<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>

<TargetComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</TargetComputerName>

<!--It is possible to pass the feature/role name instead of its ID-->

<ServerFeature>5</ServerFeature><!--"Fax Server"-->

<!--<ServerFeature>Fax Server</ServerFeature>-->

</ProbeAction>

<ConditionDetection ID="Mapper" TypeID="System!System.Discovery.ClassSnapshotDataMapper">

<ClassId>$MPElement[Name="Windows.Fax.Server"]$</ClassId>

<InstanceSettings>

<Settings>

<Setting>

<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>

<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>

</Setting>

<Setting>

<Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>

<Value>Fax Server</Value>

</Setting>

</Settings>

</InstanceSettings>

</ConditionDetection>

</MemberModules>

<Composition>

<Node ID="Mapper">

<Node ID="Probe">

<Node ID="Scheduler" />

</Node>

</Node>

</Composition>

</Composite>

</ModuleImplementation>

<OutputType>System!System.Discovery.Data</OutputType>

</DataSourceModuleType>

<Discovery ID="Windows.Fax.Server.Discovery" Enabled="true" Target="Server2008!Microsoft.Windows.Server.2008.OperatingSystem" ConfirmDelivery="true" Remotable="true" Priority="Normal">

<Category>Custom</Category>

<DiscoveryTypes>

<DiscoveryClass TypeID="Windows.Fax.Server" />

</DiscoveryTypes>

<DataSource ID="DS" TypeID="Windows.Fax.Server.Discovery.DataSource">

<IntervalSeconds>60</IntervalSeconds>

<TimeoutSeconds>360</TimeoutSeconds>

</DataSource>

</Discovery>