We are discussing development of an improved management infrastructure for our distributed system. We use COM, web services and .NET components. Since we're based on Microsoft Windows Server XP/2003, I guess, we basically have two options:
Why would we choose Powershell over WMI?
Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tools. Though this system has been designed to allow for fast, efficient system administration, it also has a spookier side: it can be abused by insiders as a tool to surveil other employees.
Microsoft has since deprecated the WMI commands in Windows in favor of their CIM counterparts. For example, if you are using PowerShell for management, you should use the CIM cmdlets and not the WMI cmdlets.
The big drawback to the WMI cmdlets is that they use DCOM to access remote machines. DCOM isn't firewall friendly, can be blocked by networking equipment, and gives some arcane errors when things go wrong.
CIM: Common Information Model (CIM) is the DMTF standard [DSP0004] for describing the structure and behavior of managed resources such as storage, network, or software components. WMI: Windows Management Instrumentation (WMI) is a CIM server that implements the CIM standard on Windows.
I would choose PowerShell over WMI for the following reasons:
Even if you go the WMI route, PowerShell does have support for working with WMI (though there are a few glitches).
To me, PowerShell is the best way to surface a task oriented interface to an application. With the support Microsoft has been providing PowerShell, it is and will be a consistent interface to managing applications and services throughout the enterprise.
My day job is as an admin and I'm pushing all the vendors I work with towards surfacing a PowerShell management API, as this makes the learning curve and context switching for managing applications much lower. On the development side, I have written (and am still working on) a series of PowerShell cmdlets for one open source product I work with and am working on another set for a separate application.
Jeffrey Snover answers the "why PowerShell" here. The post is in the context of SQL, but very much applicable here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With