{"id":20191,"date":"2023-11-16T10:56:58","date_gmt":"2023-11-16T18:56:58","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=20191"},"modified":"2023-11-16T10:56:58","modified_gmt":"2023-11-16T18:56:58","slug":"powershell-7-4-general-availability","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/powershell-7-4-general-availability\/","title":{"rendered":"PowerShell 7.4 General Availability"},"content":{"rendered":"<p>As we come to towards the end of 2023, we are excited to announce the general availability of PowerShell 7.4!\nThis release is built on <a href=\"https:\/\/learn.microsoft.com\/dotnet\/core\/whats-new\/dotnet-8\">.NET 8<\/a> and similarly,\nis our latest Long Term Support (LTS) release supported for 3 years.<\/p>\n<p>We want to thank our community and many contributors for their invaluable help identifying issues,\nengaging in discussions in our <a href=\"https:\/\/github.com\/powershell\/powershell\">repository<\/a>, providing fixes and new features,\nand helping us ship a high quality release!<\/p>\n<h2>How do I get it?<\/h2>\n<p>Since PowerShell 7 is supported on Windows, Linux, and macOS, there are a\n<a href=\"https:\/\/learn.microsoft.com\/powershell\/scripting\/install\/installing-powershell\">variety of ways to get it<\/a>.\nIf you installed the previous PowerShell 7 stable release (7.3) via the Windows Store or MSI (and opted into\n<a href=\"https:\/\/learn.microsoft.com\/powershell\/scripting\/install\/microsoft-update-faq\">Microsoft Update<\/a>),\nyou will be automatically updated to 7.4 GA.<\/p>\n<h2>What&#8217;s new?<\/h2>\n<p>This release continues to focus on enhancing the shell experience and addressing\ncommonly reported customer and partner issues.<\/p>\n<p>A detailed report of <a href=\"https:\/\/learn.microsoft.com\/powershell\/scripting\/whats-new\/what-s-new-in-powershell-74\">What&#8217;s New<\/a>\nis available in our documentation or via the <a href=\"https:\/\/www.powershellgallery.com\/packages\/Microsoft.PowerShell.WhatsNew\">WhatsNew<\/a>\nmodule.<\/p>\n<p>Here are a few highlights:<\/p>\n<h3>PSResourceGet 1.0<\/h3>\n<p>This release includes <a href=\"https:\/\/devblogs.microsoft.com\/powershell\/psresourceget-is-generally-available\/\">PSResourceGet<\/a>, which itself\nwas made generally available earlier this year.\nPSResourceGet replaces PowerShellGet (although the two work side-by-side for legacy scripts) and where we will invest future\nenhancements to the PowerShell module ecosystem.\nThis release focuses on a new codebase that is more maintainable and also provides better performance.\nIn addition, this module uses a different set of cmdlets to allow for breaking changes that provide a more intuitive user experience.<\/p>\n<h3>PSReadLine 2.3<\/h3>\n<p>This release includes the latest <a href=\"https:\/\/devblogs.microsoft.com\/powershell\/psreadline-2-3-4-ga-release\/\">PSReadLine<\/a> release\nthat contains a number of enhancements and bug fixes.<\/p>\n<h3>New stable features<\/h3>\n<p>The PowerShell Committee reviewed the experimental features we&#8217;ve had in the preview releases along with\ncommunity feedback (issues) and telemetry indicating the feature was used and not disabled and decided that\nthe following features were ready to be deemed stable for this release:<\/p>\n<ul>\n<li><code>PSConstrainedAuditLogging<\/code>\nThis feature enables PowerShell 7 to adhere to WDAC Audit mode and log events into the Windows Event Log.\nIn this mode, PowerShell runs scripts in Full Language Mode, but logs events if there would be\na difference in behavior in System Lockdown mode.\nThis makes it easier for administrators to deploy PowerShell 7 in environments that have System Lockdown mode enabled\nby understanding what scripts would need to be modified to run in that mode.<\/li>\n<li><code>PSCustomTableHeaderLabelDecoration<\/code>\nA common feedback from users is that with objects rendered as tables, it was not clear when a header\nlabel was not a property of the object.\nFor example, when using <code>Get-Process<\/code>, you&#8217;ll see a column with the header <code>CPU(s)<\/code> to indicate the\namount of cpu seconds used by that process.\nHowever, if you tried to access that property, you would find it&#8217;s actually called just <code>CPU<\/code> and the <code>(s)<\/code>\nwas added to the header to indicate that it was in seconds.\nThis new feature allows you to decorate the header label to make it clear that it is not a property of the object.\nThe default decoration simply renders the header label in italics.<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/11\/custom_header.png\" alt=\"image\" \/><\/li>\n<li><code>PSWindowsNativeCommandArgPassing<\/code>\nThis is continuation of a feature we first added in 7.3.\nA major difference between Windows and non-Windows is how arguments are parsed particularly when quotes are involved.\nAs more Open Source command-line tools are being used on Windows, we want to make sure that PowerShell\ncan pass arguments to those tools in a way that works as expected.\nHowever, many legacy command-line tools on Windows do not handle arguments in the industry standard way.\nAs such, a <code>Windows<\/code> mode for <code>$PSNativeCommandArgumentPassing<\/code> special cases some known tools to fallback to how\nit worked with Windows PowerShell while modern tools the new <code>Standard<\/code> mode.\nA <code>Legacy<\/code> mode is available for those that need to support legacy tools that do not work with the <code>Windows<\/code> mode.<\/li>\n<li><code>PSNativeCommandErrorActionPreference<\/code>\nThis is another continuation of a feature we first added in 7.3.\nThis feature allows you to treat a non-zero exit code from a native command as an ErrorRecord that would come from a cmdlet.\nThis allows you to set <code>$ErrorActionPreference<\/code> to <code>Stop<\/code> and have PowerShell stop execution whether a cmdlet had an error\nor a native command had a non-zero exit code.\nThis simplifies scripts that previously would have to check <code>$LASTEXITCODE<\/code> after execution of a native command or wrap it in a helper function.<\/li>\n<li><code>PSNativeCommandPreserveBytePipe<\/code>\nThis feature allows you to preserve the byte stream when piping to or from a native command.\nPreviously, all streams were converted to strings when piping to or from a native command and thus lost the original byte stream.\nThis is useful for tools that expect binary input such as <code>tar<\/code> or <code>zip<\/code>.<\/li>\n<\/ul>\n<p>There are still a number of experimental featues in this release pending additional user feedback before we can promote them to stable.\nFor example, we continue to iterate on the <a href=\"https:\/\/devblogs.microsoft.com\/powershell\/what-are-feedback-providers\/\">Feedback Provider<\/a>\nmodel as we get more feedback from users and partners who implement it.<\/p>\n<h3>Breaking changes<\/h3>\n<p>There are a few <a href=\"https:\/\/learn.microsoft.com\/powershell\/scripting\/whats-new\/what-s-new-in-powershell-74#breaking-changes\">Breaking Changes<\/a>\nin this release that you should be aware of although we expect them to be rare.<\/p>\n<p>One that could affect some users is the new <code>-ProgressAction<\/code> common parameter.\nSimilar to other common parameters, the new <code>-ProgressAction<\/code> parameter is automatically available to cmdlets and advanced functions.\nThis parameter allows you to control how progress is reported for a cmdlet or advanced function call.\nPreviously, you would have to set <code>$ProgressPreference<\/code> to <code>SilentlyContinue<\/code> to suppress progress and then restore it to its previous value.<\/p>\n<h2>What&#8217;s Next?<\/h2>\n<p>We will continue to focus on making PowerShell a great shell environment next year with PowerShell 7.5.\nAs usual, we&#8217;ll continue to address issues and bugs reported by our community and partners as well as adopt the latest .NET 9 preview releases.\nSpecific team investments will be discussed in a separate blog post early next year.<\/p>\n<p>Thanks again to our community and partners for their continued support and feedback!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell 7.4 GA has been released.<\/p>\n","protected":false},"author":685,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[248],"class_list":["post-20191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-powershell"],"acf":[],"blog_post_summary":"<p>PowerShell 7.4 GA has been released.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20191","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\/685"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=20191"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20191\/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=20191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=20191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=20191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}