{"id":20079,"date":"2023-08-08T08:05:27","date_gmt":"2023-08-08T16:05:27","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=20079"},"modified":"2023-08-08T08:05:27","modified_gmt":"2023-08-08T16:05:27","slug":"announcing-powershell-crescendo-1-1-0-rc1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/announcing-powershell-crescendo-1-1-0-rc1\/","title":{"rendered":"Announcing PowerShell Crescendo 1.1.0-RC1"},"content":{"rendered":"<p><!-- markdownlint-disable MD041 --><\/p>\n<p>We&#8217;re pleased to announce the release of <strong>PowerShell Crescendo 1.1.0-RC1<\/strong>. <a href=\"https:\/\/learn.microsoft.com\/powershell\/utility-modules\/crescendo\/overview?view=ps-modules\">Crescendo<\/a> is a\nframework to rapidly develop PowerShell cmdlets for common command line tools, regardless of\nplatform. This release includes improved support for PSScriptAnalyzer, improvements to error\nhandling, and the addition of <code>ExcludeAsArgument<\/code> parameter property.<\/p>\n<p>This is a community driven release built from the many suggestions and requests received directly or\nfrom our <a href=\"https:\/\/github.com\/PowerShell\/Crescendo\">Github<\/a>. Thank you PowerShell Community for your adoption and suggestions!<\/p>\n<p>The Release Candidate is now available for download on the <a href=\"https:\/\/www.powershellgallery.com\/packages\/Microsoft.PowerShell.Crescendo\/1.1.0-RC1\">PowerShell Gallery<\/a>.<\/p>\n<h2>Installing Crescendo<\/h2>\n<p>Requirements:<\/p>\n<ul>\n<li><strong>Microsoft.PowerShell.Crescendo<\/strong> requires PowerShell 7.2 or higher<\/li>\n<\/ul>\n<p>To install <strong>Microsoft.PowerShell.Crescendo<\/strong>:<\/p>\n<pre><code class=\"language-powershell\">Install-Module -Name Microsoft.PowerShell.Crescendo -AllowPreRelease<\/code><\/pre>\n<p>To install <strong>Microsoft.PowerShell.Crescendo<\/strong> using the new <a href=\"https:\/\/www.powershellgallery.com\/packages\/Microsoft.PowerShell.PSResourceGet\/0.5.23-beta23\">PowerShellGet v3<\/a>:<\/p>\n<pre><code class=\"language-powershell\">Install-PSResource -Name Microsoft.PowerShell.Crescendo -PreRelease<\/code><\/pre>\n<h2>Highlighted features<\/h2>\n<p>This Release Candidate includes many fixes and suggestions. Here are just a few of the highlights\nadded for this release.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/PowerShell\/Crescendo\/issues\/200\">Using ScriptAnalyzer with exported module generates a ton of output<\/a> (Thanks <a href=\"https:\/\/github.com\/DennisL68\">@DennisL68<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/PowerShell\/Crescendo\/issues\/191\">Increase UX of Crescendo-generated cmdlets<\/a> (Thanks <a href=\"https:\/\/github.com\/steviecoaster\">@steviecoaster<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/PowerShell\/Crescendo\/issues\/188\">CrescendoNativeErrorQueue and -ErrorAction Stop<\/a> (Thanks <a href=\"https:\/\/github.com\/MTI-gh\">@MTI-gh<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/PowerShell\/Crescendo\/issues\/186\">Crescendo should probably set $PSNativeCommandUseErrorActionPreference = $false<\/a> (Thanks\n<a href=\"https:\/\/github.com\/JamesWTruher\">JamesWTruher<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/PowerShell\/Crescendo\/issues\/167\">Add the current version of the Crescendo module<\/a> (Thanks <a href=\"https:\/\/github.com\/LaurentDardenne\">@LaurentDardenne<\/a>)<\/li>\n<\/ul>\n<h3>Using ScriptAnalyzer with exported module generates a ton of output<\/h3>\n<p>Using PSScriptAnalyzer on a Crescendo generated module could result in several violations of the\n<strong>PSAvoidTrailingWhiteSpace<\/strong> rule. This was due to an additional trailing space after generated\ncommands. The code generator for Crescendo has been updated to remove the trailing whitespace.<\/p>\n<h3>Increase UX of Crescendo-generated cmdlets<\/h3>\n<p>Crescendo is designed to pass parameters defined in the configuration as arguments to the native\napplication. There are times when you may wish to pass a parameter to the output handler but not the\nnative application. To enable this, a new boolean parameter property <code>ExcludeAsArgument<\/code> set to\n<code>true<\/code> prevents the argument from being sent to the native application. The default is <code>false<\/code>.<\/p>\n<pre><code class=\"language-json\">\"Parameters\": [\r\n        {\r\n            \"Name\": \"P1\",\r\n            \"ParameterType\": \"string\",\r\n            \"ExcludeAsArgument\": true,\r\n            \"Mandatory\": false,\r\n            \"Description\": \"Variable not sent to native app\"\r\n        }\r\n    ],<\/code><\/pre>\n<h3>CrescendoNativeErrorQueue and -ErrorAction Stop<\/h3>\n<p>Handling errors using <code>Pop-CrescendoNativeError<\/code> may include multiple errors from the same\nexecution. This can happen when the cmdlet and the native command both emit an error that gets\nenqueued by Crescendo. The architecture is modified so that the error queue is now local to the\ncmdlet.<\/p>\n<h3>Crescendo should probably set $PSNativeCommandUseErrorActionPreference = $false<\/h3>\n<p>By default, <code>$PSNativeCommandUseErrorActionPreference<\/code> is set to <code>true<\/code>. This causes Crescendo to\nproduce an additional error record for every error. To prevent this, Crescendo changes the value to\n<code>false<\/code> for each generated cmdlet.<\/p>\n<h3>Add the current version of the Crescendo module<\/h3>\n<p>Crescendo modules now include version and schema metadata at the top of the module.<\/p>\n<pre><code class=\"language-powershell\"># Module created by Microsoft.PowerShell.Crescendo\r\n# Version: 1.1.0\r\n# Schema: https:\/\/aka.ms\/PowerShell\/Crescendo\/Schemas\/2022-06\r\n# Generated at: 07\/13\/2023 12:48:59<\/code><\/pre>\n<h2>More information<\/h2>\n<p>To get started using Crescendo, check out the <a href=\"https:\/\/learn.microsoft.com\/powershell\/utility-modules\/crescendo\/overview?view=ps-modules\">documentation<\/a>.<\/p>\n<h2>Future plans<\/h2>\n<p>We value your ideas and feedback and hope you give Crescendo a try. Stop by our\n<a href=\"https:\/\/github.com\/PowerShell\/Crescendo\">GitHub repository<\/a> and let us know of any issues you find or features you would like added.<\/p>\n<p><!-- link references --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This RC contains several community requested features and fixes including improved support for PSScriptAnalyzer, improvements to error handling, and the addition of `ExcludeAsArgument` property.<\/p>\n","protected":false},"author":7527,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3173],"class_list":["post-20079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-powershell-crescendo"],"acf":[],"blog_post_summary":"<p>This RC contains several community requested features and fixes including improved support for PSScriptAnalyzer, improvements to error handling, and the addition of `ExcludeAsArgument` property.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/7527"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=20079"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20079\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=20079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=20079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=20079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}