Microsoft Releases PowerShell Crescendo Preview To Facilitate Native Command Wraps

Microsoft this week announced a preview of PowerShell Crescendo, a new module for PowerShell that aims to wrap so-called "native" utility applications via the familiar verb-noun syntax used in PowerShell cmdlets.

The idea is to make invoking these utilities more plain, like PowerShell, without having to dive deeply into a coding project to get it done. PowerShell Crescendo is a module that needs to be added to PowerShell in order to use it. It'll work with PowerShell 7 or greater or Windows PowerShell 5.1 or greater, but users can only write a module when they've got PowerShell 7.

The announcement characterized PowerShell Crescendo as a "framework" that will work across platforms: "We are pleased to announce the first preview of PowerShell Crescendo, a framework to rapidly develop PowerShell cmdlets for native commands, regardless of platform," stated Jason Helmick, a program manager on the PowerShell team.

Of course, IT pros can just use native tools as is, such as the "kubectl, docker or netsh.exe" commands. The idea behind PowerShell Crescendo seems to be that those tools can be too complex and idiosyncratic compared with PowerShell's more simple structure. However, there can be issues with wrapping those native commands in a PowerShell script, and apparently that's what the PowerShell Crescendo preview addresses. PowerShell, for instance, expects the output to be an object with properties, rather than a JavaScript Object Notation (JSON) file.

However, users will need to create a JSON file into order to write a PowerShell Crescendo module, Microsoft's announcement explained:

To author a Crescendo module, you create a JSON configuration file describing how you want the native command projected as a cmdlet. You need the Microsoft.PowerShell.Crescendo module to build the finished module containing the Crescendo proxy cmdlets.

The thinking leading up to PowerShell Crescendo is outlined in two June articles titled, "Native Commands in PowerShell -- a New Approach" (Part 1 and Part 2), authored by Jim Truher, a senior software engineer on the PowerShell Core team. The articles elicited some skeptical comments. One person suggested that a "wrapper function gives very little value for the task, but introduces dependencies and more potential ways to fail."

Nevertheless, it seems Microsoft has soldiered onward, coming out with the PowerShell Crescendo preview.

A question on who might be interested in using PowerShell Crescendo was raised by Veronique Lengelle, a Microsoft Most Valuable Professional (MVP), in this Twitter post. In response, Azure MVP Olivier Miossec said that the tool makes sense to use when there's a need to capture text output. Others felt it would be useful for use with tools like Docker and Robocopy.

About the Author

Kurt Mackie is senior news producer for 1105 Media's Converge360 group.


comments powered by Disqus

Subscribe on YouTube