Next, pick the properties you are really interested in, then replace the "*" with a comma-separated list of these properties. For example:复制代码
- Get-WmiObject -Class Win32_DiskPartition |
- Select-Object -Property *
If you pick four or less properties, the result is a neat table, otherwise a list:复制代码
- Get-WmiObject -Class Win32_DiskPartition |
- Select-Object -Property Name, BlockSize, Description, BootPartition
Name BlockSize Description BootPartition ---- --------- ----------- ------------- Disk #0, Partition #0 512 Installable File System False Disk #0, Partition #1 512 Installable File System False Disk #0, Partition #2 512 Installable File System True |
PS> Get-Wmiobject -Class Win32_*Processor* -List NameSpace: ROOT\cimv2 Name Methods Properties ---- ------- ---------- Win32_Processor {SetPowerState, R... {AddressWidth, Architecture, Availabili... Win32_ComputerSystemProcessor {} {GroupComponent, PartComponent} Win32_AssociatedProcessorMemory {} {Antecedent, BusSpeed, Dependent} Win32_PerfFormattedData_Counters... {} {BuildScatterGatherCyclesPersec, Captio... Win32_PerfRawData_Counters_PerPr... {} {BuildScatterGatherCyclesPersec, Captio... Win32_PerfFormattedData_Counters... {} {BuildScatterGatherListCallsPersec, Cap... Win32_PerfRawData_Counters_PerPr... {} {BuildScatterGatherListCallsPersec, Cap... Win32_PerfFormattedData_Counters... {} {C1TransitionsPersec, C2TransitionsPers... Win32_PerfRawData_Counters_Proce... {} {C1TransitionsPersec, C2TransitionsPers... Win32_PerfFormattedData_PerfOS_P... {} {C1TransitionsPersec, C2TransitionsPers... Win32_PerfRawData_PerfOS_Processor {} {C1TransitionsPersec, C2TransitionsPers... |
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |