とりあえずこれ覚えておくといろいろ調べやすいかも。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
PS C:\> Get-WmiObject -List NameSpace: ROOT\CIMV2 Name Methods Properties ---- ------- ---------- __SystemClass {} {} __thisNAMESPACE {} {SECURITY_DESCRIPTOR} __Provider {} {Name} __Win32Provider {} {ClientLoadableCLSID, CLSID, Concurrency, DefaultMachineNam... __ProviderRegistration {} {provider} __EventProviderRegistration {} {EventQueryList, provider} __ObjectProviderRegistration {} {InteractionType, provider, QuerySupportLevels, SupportsBat... __ClassProviderRegistration {} {CacheRefreshInterval, InteractionType, PerUserSchema, prov... __InstanceProviderRegistration {} {InteractionType, provider, QuerySupportLevels, SupportsBat... __MethodProviderRegistration {} {provider} __PropertyProviderRegistration {} {provider, SupportsGet, SupportsPut} __EventConsumerProviderRegistration {} {ConsumerClassNames, provider} |
たとえば、バッテリ情報
1 |
PS C:\> Get-WmiObject -Class Win32_Battery -ComputerName . |
別マシンの情報を見たいとき
1 |
PS C:\> Get-WmiObject -Class Win32_Battery -ComputerName [ホスト名 or IP] |