(DEPRECATED) DHCP 2012 Scopes Discovery Data Source

Microsoft.Windows.DHCPServer.2012.Scopes.Discovery (Discovery)

(DEPRECATED) This discovery rule populates the DHCP 2012 IPV4 and IPV6 Scopes installations.

Knowledge Base article:

Summary

This discovery was deprecated.

Element properties:

TargetMicrosoft.Windows.DHCPServer.2012.Server
EnabledFalse
Frequency86400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.TimedPowerShell.DiscoveryProvider System.PrivilegedMonitoringAccount

Source Code:

<Discovery ID="Microsoft.Windows.DHCPServer.2012.Scopes.Discovery" Enabled="false" Target="Microsoft.Windows.DHCPServer.2012.Server" ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.IPv4Runtime">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.DHCPComponent" PropertyID="Name"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Server" PropertyID="Name"/>
<Property TypeID="Windows!Microsoft.Windows.Computer" PropertyID="PrincipalName"/>
</DiscoveryClass>
<DiscoveryClass TypeID="Microsoft.Windows.DHCPServer.2012.IPv4Scope">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="IPAddress"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="SubnetMask"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="IsEnabled"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.DHCPComponent" PropertyID="Name"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Server" PropertyID="Name"/>
</DiscoveryClass>
<DiscoveryClass TypeID="Microsoft.Windows.DHCPServer.2012.IPv6Runtime">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.DHCPComponent" PropertyID="Name"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Server" PropertyID="Name"/>
<Property TypeID="Windows!Microsoft.Windows.Computer" PropertyID="PrincipalName"/>
</DiscoveryClass>
<DiscoveryClass TypeID="Microsoft.Windows.DHCPServer.2012.IPv6Scope">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="IPAddress"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="SubnetMask"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Scope" PropertyID="IsEnabled"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.DHCPComponent" PropertyID="Name"/>
<Property TypeID="DHCP!Microsoft.Windows.DHCPServer.Library.Server" PropertyID="Name"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" RunAs="System!System.PrivilegedMonitoringAccount" TypeID="Windows!Microsoft.Windows.TimedPowerShell.DiscoveryProvider">
<IntervalSeconds>86400</IntervalSeconds>
<SyncTime/>
<ScriptName>DiscoverDHCPScopes2012</ScriptName>
<ScriptBody><Script>

param ([String] $ElementID, [String] $TargetID, [String] $PrincipalName, [String] $NetbiosComputerName)
$SCRIPT_NAME = "DiscoverDHCPScope2012"
$ErrorActionPreference = "Stop"

# Event type constants
$EVENT_TYPE_LOG = 0
$EVENT_TYPE_ERROR = 1
$EVENT_TYPE_WARNING = 2
$EVENT_TYPE_INFORMATION = 4

# Typed property bag constants
$PROPERTY_TYPE_ALERT = 0
$PROPERTY_TYPE_EVENT = 1
$PROPERTY_TYPE_PERFORMANCE = 2
$PROPERTY_TYPE_STATE = 3

# State type constants
$STATE_SUCCESS = "Success"
$STATE_WARNING = "Warning"
$STATE_ERROR = "Error"

$momAPI = new-object -comObject MOM.ScriptAPI

$ComputerKey = "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$"
$ServerName = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.Server']/Name$"
$ComponentName = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.DHCPComponent']/Name$"
$DHCPType01 = "$MPElement[Name='Microsoft.Windows.DHCPServer.2012.IPv4Scope']$"
$DHCPType02 = "$MPElement[Name='Microsoft.Windows.DHCPServer.2012.IPv6Scope']$"
$DHCPType03 = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.IPv4Runtime']$"
$DHCPType04 = "$MPElement[Name='Microsoft.Windows.DHCPServer.2012.IPv6Runtime']$"
$Name = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.Server']/Name$"
$DisplayName = "$MPElement[Name='System!System.Entity']/DisplayName$"
$IPAddress = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.Scope']/IPAddress$"
$SubnetMask = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.Scope']/SubnetMask$"
$IsEnabled = "$MPElement[Name='DHCP!Microsoft.Windows.DHCPServer.Library.Scope']/IsEnabled$"

</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>ElementID</Name>
<Value>$MPElement$</Value>
</Parameter>
<Parameter>
<Name>TargetID</Name>
<Value>$Target/Id$</Value>
</Parameter>
<Parameter>
<Name>PrincipalName</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Parameter>
<Parameter>
<Name>NetbiosComputerName</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>