3

I've using Linux for years and recently I've joined new organisation who's entire infrastructure is based on Windows Server 2012R2. Ever since then, I've been learning PowerShell and I find it is very powerful, the notion of everything in OS is an object saves a lot text parsing as in Linux.

During my journey in learning Windows Servers, from time to time I come across WMI and I find it is very hard concept and many things that can be done in WMI can also be done in PowerShell (without Get-WmiObject CmdLet), but in an easier and nicer way.

I am very interested to know if Microsoft is gradually moving away from WMI and only focus on PowerShell? Also, please, Windows experts, veterans, advise if it is worth it to invest time in learning WMI or PowerShell(its existing and new CmdLets) will over shadow WMI?

Dilshad Abduwali
  • 175
  • 1
  • 3
  • 7
  • 1
    WMI isn't going anywhere, but if you have the option to use PowerShell/WinRM that would be the preferred way to go. – Greg Askew Feb 06 '19 at 00:51

2 Answers2

3

PowerShell is the way to go.

WMI is not bad, but it’s still up because like you can use WMI filter on your Group Policy and you can get diagnostic data from there.

In all my MVP year I never had a conference that talked about WMI, but powershell is talked everywhere.

If you do training exam, like certification, they will test your powershell knowledge too. I did some time ago my MCT and the question was; on those 4 powershell command, what is the best to do X. You will never be tested against the GUI in exam

yagmoth555
  • 16,758
  • 4
  • 29
  • 50
1

WMI/CIM will not go away. Lots of Powershell Cmdlets are wrappers around WMI functionality.

WMI is often hard to handle, Powershell cmdlets make things easier if available. But if a PS cmdlet is not available you might need 'raw' WMI/CIM

See snippet below for instance, object returned by Get-Disk is WMI:

get-disk|gm


TypeName: Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk