3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

get-wmiobjectの使い方メモ

Last updated at Posted at 2015-10-12

このコマンドレットは、現在は別の名前になっているそうです!
https://qiita.com/asterisk9101/items/8791dc0d4da77e09f505#comment-cbe8df18abc90db8b37d

以下のコマンドで、取得できるクラスの一覧が表示できる。

get-wmiobject -class meta_class | select name

欲しいクラスの絞り込み検索は以下のようにする。

get-wmiobject -class meta_class | select name | where { $_.name -match "hoge"}

サンプルとして、ユーザアカウントの一覧は以下のように取得できる。

Get-WmiObject -class win32_useraccount | select Name,FullName,Description,PasswordRequired,PasswordChangeable,PasswordExpires,Disabled,Lockout | ft -autosize
3
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?