PowerShell v7.2.0 Preview 9
PowerShell has not updated it’s preview build to v7.2.0 preview 9. This includes the following changes:
Note: Known issue about ANSI code being written out in table views when using PowerShell with a legacy host that doesn’t support virtual terminal. For details see: #15978
Breaking Changes
- Change the default value of
$PSStyle.OutputRendering
toOutputRendering.Host
and removeOutputRendering.Automatic
(#15882) - Fix
CA1052
for public API to make classes static when they only have static methods (#15775) (Thanks @xtqqczze!) - Update
pwsh.exe -File
to only accept.ps1
script files on Windows (#15859)
Engine Updates and Fixes
- Update .NET adapter to handle interface static members properly (#15908)
- Catch and handle unauthorized access exception when removing AppLocker test files (#15881)
General Cmdlet Updates and Fixes
- Add
-PassThru
parameter toSet-Clipboard
(#13713) (Thanks @ThomasNieto!) - Add
-Encoding
parameter forTee-Object
(#12135) (Thanks @Peter-Schneider!) - Update
ConvertTo-Csv
andExport-Csv
to handleIDictionary
objects (#11029) (Thanks @vexx32!) - Update the parameters
-Exception
and-ErrorRecord
forWrite-Error
to be position 0 (#13813) (Thanks @ThomasNieto!) - Don’t use
ArgumentList
when creating COM object withNew-Object
as it’s not applicable to the COM parameter set (#15915) - Fix
$PSStyle
list output to correctly showTableHeader
(#15928) - Remove the
PSImplicitRemotingBatching
experimental feature (#15863) - Fix issue with
Get-Process -Module
failing to stop when it’s piped toSelect-Object
(#15682) (Thanks @ArmaanMcleod!) - Make the experimental features
PSUnixFileStat
,PSCultureInvariantReplaceOperator
,PSNotApplyErrorActionToStderr
,PSAnsiRendering
,PSAnsiProgressFeatureName
stable (#15864) - Enhance
Remove-Item
to work with OneDrive (#15571) (Thanks @iSazonov!) - Make global tool entrypoint class static (#15880)
- Update
ServerRemoteHost
version to be same asPSVersion
(#15809) - Make the initialization of
HttpKnownHeaderNames
thread safe (#15519) (Thanks @iSazonov!) ConvertTo-Csv
: Quote fields with quotes and newlines when using-UseQuotes AsNeeded
(#15765) (Thanks @lselden!)- Forwarding progress stream changes from
Foreach-Object -Parallel
runspaces (#14271) (Thanks @powercode!) - Add validation to
$PSStyle
to reject printable text when setting a property that only expects ANSI escape sequence (#15825)
You are able to see the latest changes and keep track of the development over at the GitHub page.
Looking for a book on PowerShell SysAdmins:
My name is Scott.
Currently, I am an Automation Developer. I have a passion for all things Tech. Focusing on tech news with computer tips and tricks and well as my developer journey.