Como posso obter o endereço de dispositivo mapeado na memória para uma unidade de disco começando com um disco enumerado por
PS C:\WINDOWS\system32> gwmi Win32_DiskDrive | fl *
Eu posso usar
PS C:\WINDOWS\system32> gwmi Win32_DeviceMemoryAddress | fl *
Este comando lista os endereços de dispositivos mapeados na memória, no entanto, não vejo nada sobreposto ao Win32_DiskDrive.
Sim, sou novo no gwmi. Eu sei o básico, então talvez seja possível.
Como obtenho o endereço de dispositivo mapeado na memória para uma unidade de disco específica, diga esta:
PSComputerName : JMR-ENG-SARAH
ConfigManagerErrorCode : 0
LastErrorCode :
NeedsCleaning :
Status : OK
DeviceID : \.\PHYSICALDRIVE1
StatusInfo :
Partitions : 2
BytesPerSector : 512
ConfigManagerUserConfig : False
DefaultBlockSize :
Index : 1
InstallDate :
InterfaceType : SCSI
MaxBlockSize :
MaxMediaSize :
MinBlockSize :
NumberOfMediaSupported :
SectorsPerTrack : 63
Size : 512105932800
TotalCylinders : 62260
TotalHeads : 255
TotalSectors : 1000206900
TotalTracks : 15876300
TracksPerCylinder : 255
__GENUS : 2
__CLASS : Win32_DiskDrive
__SUPERCLASS : CIM_DiskDrive
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_DiskDrive.DeviceID="\\.\PHYSICALDRIVE1"
__PROPERTY_COUNT : 51
__DERIVATION : {CIM_DiskDrive, CIM_MediaAccessDevice, CIM_LogicalDevice, CIM_LogicalElement...}
__SERVER : JMR-ENG-SARAH
__NAMESPACE : root\cimv2
__PATH : \JMR-ENG-SARAH\root\cimv2:Win32_DiskDrive.DeviceID="\\.\PHYSICALDRIVE1"
Availability :
Capabilities : {3, 4}
CapabilityDescriptions : {Random Access, Supports Writing}
Caption : Samsung SSD 960 PRO 512GB
CompressionMethod :
CreationClassName : Win32_DiskDrive
Description : Disk drive
ErrorCleared :
ErrorDescription :
ErrorMethodology :
FirmwareRevision : 1B6QCXP7
Manufacturer : (Standard disk drives)
MediaLoaded : True
MediaType : Fixed hard disk media
Model : Samsung SSD 960 PRO 512GB
Name : \.\PHYSICALDRIVE1
PNPDeviceID : SCSI\DISK&VEN_NVME&PROD_SAMSUNG_SSD_960&11BF5A6C&0&000000
PowerManagementCapabilities :
PowerManagementSupported :
SCSIBus : 0
SCSILogicalUnit : 0
SCSIPort : 1
SCSITargetId : 0
SerialNumber : 0025_385C_6150_0AD4.
Signature :
SystemCreationClassName : Win32_ComputerSystem
SystemName : JMR-ENG-SARAH
Scope : System.Management.ManagementScope
Path : \JMR-ENG-SARAH\root\cimv2:Win32_DiskDrive.DeviceID="\\.\PHYSICALDRIVE1"
Options : System.Management.ObjectGetOptions
ClassPath : \JMR-ENG-SARAH\root\cimv2:Win32_DiskDrive
Properties : {Availability, BytesPerSector, Capabilities, CapabilityDescriptions...}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers : {dynamic, Locale, provider, UUID}
Site :
Container :
Aqui está um exemplo de saída de Win32_DeivceMemoryAddress
:
PSComputerName : JMR-ENG-SARAH
Status : OK
Name : 0xF7400000-0xF76FFFFF
MemoryType : WindowDecode
__GENUS : 2
__CLASS : Win32_DeviceMemoryAddress
__SUPERCLASS : Win32_SystemMemoryResource
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_DeviceMemoryAddress.StartingAddress="4148166656"
__PROPERTY_COUNT : 11
__DERIVATION : {Win32_SystemMemoryResource, CIM_MemoryMappedIO, CIM_SystemResource, CIM_LogicalElement...}
__SERVER : JMR-ENG-SARAH
__NAMESPACE : root\cimv2
__PATH : \JMR-ENG-SARAH\root\cimv2:Win32_DeviceMemoryAddress.StartingAddress="4148166656"
Caption : 0xF7400000-0xF76FFFFF
CreationClassName : Win32_DeviceMemoryAddress
CSCreationClassName : Win32_ComputerSystem
CSName : JMR-ENG-SARAH
Description : 0xF7400000-0xF76FFFFF
EndingAddress : 4151312383
InstallDate :
StartingAddress : 4148166656
Scope : System.Management.ManagementScope
Path : \JMR-ENG-SARAH\root\cimv2:Win32_DeviceMemoryAddress.StartingAddress="4148166656"
Options : System.Management.ObjectGetOptions
ClassPath : \JMR-ENG-SARAH\root\cimv2:Win32_DeviceMemoryAddress
Properties : {Caption, CreationClassName, CSCreationClassName, CSName...}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers : {dynamic, Locale, provider, UUID}
Site :
Container :
Encontrei este site , que fornece uma boa lista de tags WMI Win32_ * disponíveis e através das tags CIM.
Qual seria o comando WMI e como obtenho as informações a partir de uma unidade Win32_DiskDrive?
ATUALIZAÇÃO:
O Windows não faz, a partir desta pergunta, manipular os SSDs NVMe da mesma forma que os SSDs regulares. Como tal, o controlador IDE e muitos outros recursos enumerados pelo WMI estão errados ou não funcionam.