WMIC Notes

WMI designed to give applications access to managed objects (Processes, reg keys, files, etc)

WMI breakdown:

Consumers: Management Applications (WMI Consumers)

Infrastructure: WMI Core (CIM Object Manager) -> Database

Providers: WMI Providers -> Managed Objects

The easiest way to access these Managed objects is with wmic. wmic command should be run in CMD prompt. Not all commands work in PS.

To use WMI you need to know 3 things:

  1. Available classes

  2. Class names

  3. Class properties and methods

List available WMI/CIM classes:

Get-CimClass 

OR

Get-WMIObject -List -Namespace root\wmi

To query a specific Class for Properties and Methods:

Get-CimInstance -ClassName [Class Name] | Get-Member

Or

To search through a specific class and filter on a string

Or

Filter output based on property value

Example:

OR

Almost every command will have a list brief and list full option. Results vary.

Filtering and using get with WMIC: get allows you to specify what field you want. This is the alternative to Get-CimInstance.

Get process information:

Get a single process info:

Last updated

Was this helpful?