Discover Windows Disk Partitions

Microsoft.Windows.Server.2008.DiskPartition.Discovery (Discovery)

This rule uses WMI to discover all Windows disk partitions.

Knowledge Base article:

Summary

This Discovery Rule discovers and populates the Windows Server Class named "Windows Server 2008 Disk Partition" with instances Disk Partitions that are discovered on Windows 2008 Servers.

Element properties:

TargetMicrosoft.Windows.Server.2008.OperatingSystem
EnabledFalse
Frequency86700
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:
Discovered relationships and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DiscoveryDataSource DataSource Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper Default

Source Code:

<Discovery ID="Microsoft.Windows.Server.2008.DiskPartition.Discovery" Enabled="false" Target="Microsoft.Windows.Server.2008.OperatingSystem">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.Server.2008.DiskPartition">
<Property TypeID="Windows!Microsoft.Windows.LogicalDevice" PropertyID="DeviceID"/>
<Property TypeID="Windows!Microsoft.Windows.LogicalDevice" PropertyID="Name"/>
<Property TypeID="Windows!Microsoft.Windows.LogicalDevice" PropertyID="Description"/>
<Property TypeID="WindowsServer!Microsoft.Windows.Server.DiskPartition" PropertyID="DiskIndex"/>
<Property TypeID="WindowsServer!Microsoft.Windows.Server.DiskPartition" PropertyID="BlockSize"/>
<Property TypeID="WindowsServer!Microsoft.Windows.Server.DiskPartition" PropertyID="PrimaryPartition"/>
<Property TypeID="WindowsServer!Microsoft.Windows.Server.DiskPartition" PropertyID="Bootable"/>
<Property TypeID="WindowsServer!Microsoft.Windows.Server.DiskPartition" PropertyID="Size"/>
</DiscoveryClass>
<DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLogicalDevice"/>
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
<NameSpace>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\root\cimv2</NameSpace>
<Query>SELECT DeviceID, Name, DiskIndex, BlockSize, Description, PrimaryPartition, BootPartition, Size FROM Win32_DiskPartition</Query>
<Frequency>86700</Frequency>
<ClassId>$MPElement[Name="Microsoft.Windows.Server.2008.DiskPartition"]$</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="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</Name>
<Value>$Data/Property[@Name='DeviceID']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/Name$</Name>
<Value>$Data/Property[@Name='Name']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsServer!Microsoft.Windows.Server.DiskPartition"]/DiskIndex$</Name>
<Value>$Data/Property[@Name='DiskIndex']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsServer!Microsoft.Windows.Server.DiskPartition"]/BlockSize$</Name>
<Value>$Data/Property[@Name='BlockSize']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/Description$</Name>
<Value>$Data/Property[@Name='Description']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsServer!Microsoft.Windows.Server.DiskPartition"]/PrimaryPartition$</Name>
<Value>$Data/Property[@Name='PrimaryPartition']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsServer!Microsoft.Windows.Server.DiskPartition"]/Bootable$</Name>
<Value>$Data/Property[@Name='BootPartition']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsServer!Microsoft.Windows.Server.DiskPartition"]/Size$</Name>
<Value>$Data/Property[@Name='Size']$</Value>
</Setting>
</Settings>
</InstanceSettings>
</DataSource>
</Discovery>