Disk Partition to Logical Disk Discovery Rule

Microsoft.Windows.Client.Win10.DiskPartitionContainsLogicalDisk.Discovery (Discovery)

This rule discovers the relationships between disk partitions and logical disks

Knowledge Base article:

Summary

This Discovery Rule discovers and populates Windows 10 and above relationship class named “Disk Partition Contains Logical Disk” with instances of the Disk Partition contains Logical Disk relationship.

Element properties:

TargetMicrosoft.Windows.Client.Win10.DiskPartition
EnabledTrue
Frequency86580
RemotableFalse

Object Discovery Details:

Discovered relationships and their attribuets:

Member Modules:

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

Source Code:

<Discovery ID="Microsoft.Windows.Client.Win10.DiskPartitionContainsLogicalDisk.Discovery" Enabled="true" Target="Microsoft.Windows.Client.Win10.DiskPartition">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryRelationship TypeID="Microsoft.Windows.Client.Win10.DiskPartitionContainsLogicalDisk"/>
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource" TypeID="Windows!Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper">
<NameSpace>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\root\cimv2</NameSpace>
<Query>associators of {win32_diskpartition='$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$'} where ResultClass=Win32_LogicalDisk</Query>
<Frequency>86580</Frequency>
<RelationshipId>$MPElement[Name="Microsoft.Windows.Client.Win10.DiskPartitionContainsLogicalDisk"]$</RelationshipId>
<SourceRoleSettings>
<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>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</Value>
</Setting>
</Settings>
</SourceRoleSettings>
<TargetRoleSettings>
<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>
</Settings>
</TargetRoleSettings>
</DataSource>
</Discovery>