Physical Disk to Disk Partition Discovery Rule

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

This rule discovers the relationships between physical disks and disk partitions

Knowledge Base article:

Summary

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

Element properties:

TargetMicrosoft.Windows.Client.Win10.PhysicalDisk
EnabledTrue
Frequency86940
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.PhysicalDiskContainsDiskPartition.Discovery" Enabled="true" Target="Microsoft.Windows.Client.Win10.PhysicalDisk">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryRelationship TypeID="Microsoft.Windows.Client.Win10.PhysicalDiskContainsDiskPartition"/>
</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_diskdrive='$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$'} where ResultClass=Win32_DiskPartition</Query>
<Frequency>86940</Frequency>
<RelationshipId>$MPElement[Name="Microsoft.Windows.Client.Win10.PhysicalDiskContainsDiskPartition"]$</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>