Discovery for the Application Integration features
The Application Integration discovery checks the following registry locations to verify that the feature is configured:
HKLM\SOFTWARE\Microsoft\Host Integration Server\ConfiguredFeatures\ApplicationIntegration
HKLM\SOFTWARE\Microsoft\Host Integration Server\ConfiguredFeatures\SessionIntegration
If either of these locations are found, the Host Integration Server 2016 Management Pack creates an instance of the AppInt class.
Target | Microsoft.HostIntegrationServer.2016.HISInstallations |
Enabled | True |
Frequency | 21600 |
Remotable | False |
Discovered Classes and their attribuets: |
---|
|
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.TimedScript.DiscoveryProvider | Default |
<Discovery ID="Microsoft.HostIntegrationServer.2016.AppIntDiscovery" Enabled="true" Target="Microsoft.HostIntegrationServer.2016.HISInstallations" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.HostIntegrationServer.2016.AppInt">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>21600</IntervalSeconds>
<SyncTime/>
<ScriptName>HIS2016 AppInt-SessionInt Discovery.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Arguments>
<ScriptBody>
'--------------------------------------------------------------------------------------------------
' <name>HIS2016 AppInt-SessionInt Discovery.vbs</name>
' <company>Microsoft Corporation</company>
' <copyright>Copyright (c) Microsoft Corporation 2016</copyright>
' <summary>
' Microsoft Host Integration Server 2016 AppInt discovery script for use with SCOM 2016.
' Provides discovery functions for Host Integration Server 2016.
' </summary>
'
' See Management Pack Guide for details on parameters and usage
'--------------------------------------------------------------------------------------------------
Option Explicit
SetLocale("en-us")
Dim oAPI, oDiscoveryData, oInst
Set oAPI = CreateObject("MOM.ScriptAPI")
Dim oArgs
Set oArgs = WScript.Arguments
if oArgs.Count < 3 Then
Wscript.Quit -1
End If
Dim SourceID, ManagedEntityId, TargetComputer
SourceId = oArgs(0)
ManagedEntityId = oArgs(1)
TargetComputer = oArgs(2)
set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
Dim strNetbiosName
strNetbiosName = "$Target/Host/Property[Type='Windows!Microsoft.Windows.Computer']/NetbiosComputerName$"
If IsAppIntConfigured OR IsSessionIntConfigured = True then
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.HostIntegrationServer.2016.AppInt']$")
Call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Application Integration")
call oDiscoveryData.AddInstance(oInst)
End If
call oAPI.Return(oDiscoveryData)
Function IsAppIntConfigured()
CONST WMI_REG_HKLM = &H80000002
CONST HIS_KEYPATH = "SOFTWARE\Microsoft\Host Integration Server\ConfiguredFeatures\ApplicationIntegration"
CONST HIS_KEY = "IsEnabled"
Dim oRegProvider
Dim intReturn, strIsEnabled
strIsEnabled = "FALSE"
set oRegProvider=GetObject("winmgmts:\\" & TargetComputer & "\root\default:StdRegProv")
intReturn = oRegProvider.GetStringValue (WMI_REG_HKLM, HIS_KEYPATH, HIS_KEY, strIsEnabled)
if UCase(strIsEnabled) = "TRUE" then
IsAppIntConfigured = True
Else
IsAppIntConfigured = False
end if
End Function 'IsAppIntConfigured
Function IsSessionIntConfigured()
CONST WMI_REG_HKLM = &H80000002
CONST HIS_KEYPATH = "SOFTWARE\Microsoft\Host Integration Server\ConfiguredFeatures\SessionIntegration"
CONST HIS_KEY = "IsEnabled"
Dim oRegProvider
Dim intReturn, strIsEnabled
strIsEnabled = "FALSE"
set oRegProvider=GetObject("winmgmts:\\" & TargetComputer & "\root\default:StdRegProv")
intReturn = oRegProvider.GetStringValue (WMI_REG_HKLM, HIS_KEYPATH, HIS_KEY, strIsEnabled)
if UCase(strIsEnabled) = "TRUE" then
IsSessionIntConfigured = True
Else
IsSessionIntConfigured = False
end if
End Function 'IsSessionIntConfigured
</ScriptBody>
<TimeoutSeconds>360</TimeoutSeconds>
</DataSource>
</Discovery>