Discover Windows Logical Disks

Microsoft.Windows.Client.Win7.LogicalDisk.Discovery (Discovery)

This rule uses WMI to discover all Windows logical disks excluding removable drives and network drives. This rule does not discover drives mounted with no drive letter. There is a separate discovery rule for such drives.

Knowledge Base article:

Summary

This Discovery Rule discovers and populates the Windows 7 Class named “Windows 7 Logical Disk” with instances of Logical Disks (for example: C:, D:) that are discovered on Windows 7. Please note that only Local Disks are detected. Logical Disks that are classified as Removable, Compact Disk, Network Drive, and RAM Disks are excluded.

Element properties:

TargetMicrosoft.Windows.Client.Win7.OperatingSystem
EnabledTrue
Frequency14400
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 System.PrivilegedMonitoringAccount

Source Code:

<Discovery ID="Microsoft.Windows.Client.Win7.LogicalDisk.Discovery" Enabled="true" Target="Microsoft.Windows.Client.Win7.OperatingSystem">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.Windows.Client.Win7.LogicalDisk">
<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="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="FileSystem"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="Compressed"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="Size"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="DriveType"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="SupportsDiskQuota"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="QuotasDisabled"/>
<Property TypeID="WindowsClient!Microsoft.Windows.Client.LogicalDisk" PropertyID="SupportsFileBasedCompression"/>
</DiscoveryClass>
<DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLogicalDevice"/>
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource" RunAs="System!System.PrivilegedMonitoringAccount" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
<NameSpace>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\root\cimv2</NameSpace>
<Query>SELECT DeviceID,Name,Description,FileSystem,Compressed,Size,DriveType,SupportsDiskQuotas,QuotasDisabled,SupportsFileBasedCompression FROM Win32_LogicalDisk WHERE DriveType=3 and FileSystem!=null</Query>
<Frequency>14400</Frequency>
<ClassId>$MPElement[Name="Microsoft.Windows.Client.Win7.LogicalDisk"]$</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="Windows!Microsoft.Windows.LogicalDevice"]/Description$</Name>
<Value>$Data/Property[@Name='Description']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/FileSystem$</Name>
<Value>$Data/Property[@Name='FileSystem']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/Compressed$</Name>
<Value>$Data/Property[@Name='Compressed']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/Size$</Name>
<Value>$Data/Property[@Name='Size']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/DriveType$</Name>
<Value>$Data/Property[@Name='DriveType']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/SupportsDiskQuota$</Name>
<Value>$Data/Property[@Name='SupportsDiskQuotas']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/QuotasDisabled$</Name>
<Value>$Data/Property[@Name='QuotasDisabled']$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsClient!Microsoft.Windows.Client.LogicalDisk"]/SupportsFileBasedCompression$</Name>
<Value>$Data/Property[@Name='SupportsFileBasedCompression']$</Value>
</Setting>
</Settings>
</InstanceSettings>
</DataSource>
</Discovery>