在PowerShell中提取一个类的定义
PS C:\Users\haife> Get-WmiObject -query "SELECT * FROM meta_class WHERE __class = 'Win32_LogicalDisk'"
NameSpace:ROOT\cimv2
Name Methods Properties
---- ------- ----------
Win32_LogicalDisk {SetPowerState, R... {Access, Availability, BlockSize, Caption...}
如果执行 Get-WmiObject -query "SELECT * FROM meta_class" ,则返回当前命名空间中所有的类定义。
Reference:
https://docs.microsoft.com/zh-cn/windows/win32/wmisdk/retrieving-a-class