WMI Explorer操做 和 powershell命令

 powershell查看wmi root 空间shell

PS C:\Users\yyy> Get-WmiObject -Class __namespace -Namespace root | select name

name
----
subscription
DEFAULT
CIMV2
msdtc
Cli
Intel_ME
SECURITY
SecurityCenter2
RSOP
PEH
StandardCimv2
WMI
directory
Policy
Interop
Hardware
ServiceModel
SecurityCenter
Microsoft
aspnet
Appv

 

WMI Explorer查看wmi root 空间:spa

 

支持全部PS版本。代理

WMI服务可以报告详细的硬件信息。一般,每一个硬件都来自它们本身的WMI代理类。可是要找出这些硬件类的名字是不容易。code

全部硬件类都在同一个WMI根下面,你能够在根类查询全部的硬件:blog

Get-WmiObject  -Class  CIM_LogicalDevice |  Out-GridView

上面命令能返回基础硬件清单。可是你要得到更多的信息,加上补充的代码,你还能够从WMI中得到硬件类的名字:ip

PS C:\Users\yyy> Get-WmiObject -Class CIM_LogicalDevice |Select-Object -Property __Class, Description | Sort-Object -Property __Class -Unique | >> Out-GridView

如今你能够使用不一样的类名查询硬件的详细类型和得到它们的清单:it

 

PS> Get-WmiObject -Class Win32_SoundDevice
 
Manufacturer        Name                Status                       StatusInfo
------------        ----                ------                       ----------
Cirrus Logic, Inc.  Cirrus Logic CS4... OK                                    3
Intel(R) Corpora... Intel(R) Display... OK                                    3
相关文章
相关标签/搜索