Descobrir Discos Lógicos do Windows

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

Esta regra usa o WMI para descobrir todos os discos lógicos do Windows excluindo unidades removíveis e unidades de rede. Esta regra não descobre unidades montadas sem nenhuma letra da unidade. Existe uma regra de descoberta separada para essas unidades.

Knowledge Base article:

Resumo

Esta Regra de Descoberta descobre e preenche a classe do Windows Client denominada “Disco Lógico do Windows Client 2003” com instâncias de Discos Lógicos (por exemplo: C:, D:) descobertos em Clientes do Windows 2003. Observe que apenas Discos Lógicos são detectados. Discos Lógicos que são classificados como Removíveis, Compact Disk, Unidade de Rede e Discos RAM são excluídos.

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>