WMI and Powershell: Do I need both, or can I just use PowerShell? When to use one or the other?

I am not too familiar with WMI (Windows Management Instrumentation), but understand some of the things
it can do. I hear good things about it, however.

Is this something that I really should know, or can I get by without it?

I am more familiar with PowerShell (not a pro, but get by).

My question really is, can't I JUST use PowerShell to accomplish everything, or do I need to use both (individually or together)?.

Please provide any pros/cons and limitations to each to as to why you may need to use the other, or in combination with

Who is Participating?
WMI and Powershell are independent technologies.  They can be used separately or together.

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers but WMI also supplies management data to other parts of the operating system and products, for example System Center Operations Manager, formerly Microsoft Operations Manager (MOM), or Windows Remote Management (WinRM).

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and CIM enabling management of remote Linux systems and network devices.

Using WMI in your Powershell scripts only makes sense as it's primary purpose is to assist in the management of the Windows Operating system.  But that doesn't mean that you have to.

it helps.  You can use powershell to access some WMI data repositories .....

a question in the abstruct, knowing what information is available helps solve/monitor .....
A number of PowerShell cmdlets actually make use of WMI behind the scenes.  You can do a lot in PS without knowing about WMI namespaces, classes, and filtering, but being able to use WMI expands what information you can gather and operations you can perform.  The same could be said about .Net, sometimes there just isn't a way to do things without directly referencing the .Net classes and methods.

So whether you can get by without knowing one or the other really depends on what you're trying to do.
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
WMI is still used in PowerShell for remote operations. Knowing WMI enriches your tools knowledge, so you are able to provide a more simple solution to your demands - some PS approaches are cumbersome without.
E.g. it is much more efficient to get remote disk info (partition size ...) with WMI, and process the result in PS, as doing it in PS solely.
Also there is stuff you can only do with WMI (or Scheduled Tasks), like certain trigger actions ("start script if CPU is above 90% for 5 minutes").
ITAddictAuthor Commented:
Thank you guys for the clarification.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.