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
both.

Thanks
LVL 2
ITAddictAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
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 .....
0
it_saigeDeveloperCommented:
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).
Source

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.
Source

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.

-saige-
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
footechCommented:
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.
0
Qlemo"Batchelor", 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").
0
ITAddictAuthor Commented:
Thank you guys for the clarification.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.