Get-WmiObject: Querying WMI on Local and Remote Computers

Whenever we need to discover just about any information about a Windows computer and it’s components, we can do so with Get-WmiObject. Not only reading, by leveraging WMI methods, Get-WmiObject can also run actions on local or remote systems as well. This cmdlet is one of a couple in PowerShell that can work with the WMI repository to make managing lots of systems a whole lot easier. Discovering Classes with Get-WmiObject At it’s most basic this cmdlet can query information from a local computer. All you’ll need to know is the namespace (probably root\cimv2 which is default) and the WMI class where the information you’re looking for is located. There are thousands of classes, and you probably don’t know which class you’d like to use yet. Using Get-WmiObject, we can query all of the available classes in a namespace. Using Get-WmiObject -List, you’ll be able to see all of the […]

Read more