v7.2.0-preview.2 Release of PowerShell
Pre-release
Pre-release
rjmholt
released this
15 Dec 21:31
·
2195 commits
to master
since this release
7.2.0-preview.2 - 2020-12-15
Breaking Changes
- Improve detection of mutable value types (#12495) (Thanks @vexx32!)
- Ensure
-PipelineVariable
is set for all output from script cmdlets (#12766) (Thanks @vexx32!)
Experimental Features
PSAnsiRendering
: Enable ANSI formatting via$PSStyle
and support suppressing ANSI output (#13758)
Performance
- Optimize
IEnumerable
variant of replace operator (#14221) (Thanks @iSazonov!) - Refactor multiply operation for better performance in two
Microsoft.PowerShell.Commands.Utility
methods (#14148) (Thanks @xtqqczze!) - Use
Environment.TickCount64
instead ofDatetime.Now
as the random seed for AppLocker test file content (#14283) (Thanks @iSazonov!) - Avoid unnecessary array allocations when searching in GAC (#14291) (Thanks @xtqqczze!)
- Use
OrdinalIgnoreCase
inCommandLineParser
(#14303) (Thanks @iSazonov!) - Use
StringComparison.Ordinal
instead ofStringComparison.CurrentCulture
(#14298) (Thanks @iSazonov!) - Avoid creating instances of the generated delegate helper class in
-replace
implementation (#14128)
General Cmdlet Updates and Fixes
- Write better error message if config file is broken (#13496) (Thanks @iSazonov!)
- Make AppLocker Enforce mode take precedence over UMCI Audit mode (#14353)
- Add
-SkipLimitCheck
switch toImport-PowerShellDataFile
(#13672) - Restrict
New-Object
in NoLanguage mode under lock down (#14140) (Thanks @krishnayalavarthi!) - The
-Stream
parameter now works with directories (#13941) (Thanks @kyanha!) - Avoid an exception if file system does not support reparse points (#13634) (Thanks @iSazonov!)
- Enable
CA1012
: Abstract types should not have public constructors (#13940) (Thanks @xtqqczze!) - Enable
SA1212
: Property accessors should follow order (#14051) (Thanks @xtqqczze!)
Code Cleanup
We thank the following contributors!
@xtqqczze, @matthewjdegarmo, @powercode, @Gimly
- Enable
SA1007
: Operator keyword should be followed by space (#14130) (Thanks @xtqqczze!) - Expand
where
alias toWhere-Object
inReset-PWSHSystemPath.ps1
(#14113) (Thanks @matthewjdegarmo!) - Fix whitespace issues (#14092) (Thanks @xtqqczze!)
- Add
StyleCop.Analyzers
package (#13963) (Thanks @xtqqczze!) - Enable
IDE0041
:UseIsNullCheck
(#14041) (Thanks @xtqqczze!) - Enable
IDE0082
:ConvertTypeOfToNameOf
(#14042) (Thanks @xtqqczze!) - Remove unnecessary usings part 4 (#14023) (Thanks @xtqqczze!)
- Fix
PriorityAttribute
name (#14094) (Thanks @xtqqczze!) - Enable nullable:
System.Management.Automation.Interpreter.IBoxableInstruction
(#14165) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Provider.IDynamicPropertyProvider
(#14167) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Language.IScriptExtent
(#14179) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Language.ICustomAstVisitor2
(#14192) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.LanguagePrimitives.IConversionData
(#14187) (Thanks @powercode!) - Enable nullable:
System.Automation.Remoting.Client.IWSManNativeApiFacade
(#14186) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Language.ISupportsAssignment
(#14180) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.ICommandRuntime2
(#14183) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.IOutputProcessingState
(#14175) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.IJobDebugger
(#14174) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Interpreter.IInstructionProvider
(#14173) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.IHasSessionStateEntryVisibility
(#14169) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Tracing.IEtwEventCorrelator
(#14168) (Thanks @powercode!) - Fix syntax error in Windows packaging script (#14377)
- Remove redundant local assignment in
AclCommands
(#14358) (Thanks @xtqqczze!) - Enable nullable:
System.Management.Automation.Language.IAstPostVisitHandler
(#14164) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.IModuleAssemblyInitializer
(#14158) (Thanks @powercode!) - Use
Microsoft.PowerShell.MarkdownRender
package fromnuget.org
(#14090) - Replace
GetFiles
inTestModuleManifestCommand
(#14317) (Thanks @xtqqczze!) - Enable nullable:
System.Management.Automation.Provider.IContentWriter
(#14152) (Thanks @powercode!) - Simplify getting Encoding in
TranscriptionOption.FlushContentToDisk
(#13910) (Thanks @Gimly!) - Mark applicable structs as
readonly
and usein
-modifier (#13919) (Thanks @xtqqczze!) - Enable nullable:
System.Management.Automation.IArgumentCompleter
(#14182) (Thanks @powercode!) - Enable
CA1822
: Markprivate
members asstatic
(#13897) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 6 (#14338) (Thanks @xtqqczze!) - Avoid array allocations from
GetDirectories
/GetFiles
. (#14328) (Thanks @xtqqczze!) - Avoid array allocations from
GetDirectories
/GetFiles
. (#14330) (Thanks @xtqqczze!) - Fix
RCS1188
: Remove redundant auto-property initialization part 2 (#14262) (Thanks @xtqqczze!) - Enable nullable:
System.Management.Automation.Host.IHostSupportsInteractiveSession
(#14170) (Thanks @powercode!) - Enable nullable:
System.Management.Automation.Provider.IPropertyCmdletProvider
(#14176) (Thanks @powercode!) - Fix
IDE0090
: Simplify new expression part 5 (#14301) (Thanks @xtqqczze!) - Enable
IDE0075
:SimplifyConditionalExpression
(#14078) (Thanks @xtqqczze!) - Remove unnecessary usings part 9 (#14288) (Thanks @xtqqczze!)
- Fix StyleCop and MarkdownLint CI failures (#14297) (Thanks @xtqqczze!)
- Enable
SA1000
: Keywords should be spaced correctly (#13973) (Thanks @xtqqczze!) - Fix
RCS1188
: Remove redundant auto-property initialization part 1 (#14261) (Thanks @xtqqczze!) - Mark
private
members asstatic
part 10 (#14235) (Thanks @xtqqczze!) - Mark
private
members asstatic
part 9 (#14234) (Thanks @xtqqczze!) - Fix
SA1642
forMicrosoft.Management.Infrastructure.CimCmdlets
(#14239) (Thanks @xtqqczze!) - Use
AsSpan
/AsMemory
slice constructor (#14265) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 4.6 (#14260) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 4.5 (#14259) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 4.3 (#14257) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 4.2 (#14256) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 2 (#14200) (Thanks @xtqqczze!) - Enable
SA1643
: Destructor summary documentation should begin with standard text (#14236) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplify new expression part 4.4 (#14258) (Thanks @xtqqczze!) - Use xml documentation child blocks correctly (#14249) (Thanks @xtqqczze!)
- Fix
IDE0090
: Simplifynew
expression part 4.1 (#14255) (Thanks @xtqqczze!) - Use consistent spacing in xml documentation tags (#14231) (Thanks @xtqqczze!)
- Enable
IDE0074
: Use coalesce compound assignment (#13396) (Thanks @xtqqczze!) - Remove unnecessary finalizers (#14248) (Thanks @xtqqczze!)
- Mark local variable as
const
(#13217) (Thanks @xtqqczze!) - Fix
IDE0032
:UseAutoProperty
part 2 (#14244) (Thanks @xtqqczze!) - Fix
IDE0032
:UseAutoProperty
part 1 (#14243) (Thanks @xtqqczze!) - Mark
private
members asstatic
part 8 (#14233) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 6 (#14229) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 5 (#14228) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 4 (#14227) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 3 (#14226) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 2 (#14225) (Thanks @xtqqczze!) - Fix
CA1822
: Mark members asstatic
part 1 (#14224) (Thanks @xtqqczze!) - Use
see
keyword in documentation (#14220) (Thanks @xtqqczze!) - Enable
CA2211
: Non-constant fields should not be visible (#14073) (Thanks @xtqqczze!) - Enable
CA1816
:Dispose
methods should callSuppressFinalize
(#14074) (Thanks @xtqqczze!) - Remove incorrectly implemented finalizer (#14246) (Thanks @xtqqczze!)
- Fix
CA1822
: Mark members asstatic
part 7 (#14230) (Thanks @xtqqczze!) - Fix
SA1122
: Usestring.Empty
for empty strings (#14218) (Thanks @xtqqczze!) - Fix various xml documentation issues (#14223) (Thanks @xtqqczze!)
- Remove unnecessary
using
s part 8 (#14072) (Thanks @xtqqczze!) - Enable
SA1006
: Preprocessor keywords should not be preceded by space (#14052) (Thanks @xtqqczze!) - Fix
SA1642
forMicrosoft.PowerShell.Commands.Utility
(#14142) (Thanks @xtqqczze!) - Enable
CA2216
: Disposable types should declare finalizer (#14089) (Thanks @xtqqczze!) - Wrap and name
LoadBinaryModule
arguments (#14193) (Thanks @xtqqczze!) - Wrap and name
GetListOfFilesFromData
arguments (#14194) (Thanks @xtqqczze!) - Enable
SA1002
: Semicolons should be spaced correctly (#14197) (Thanks @xtqqczze!) - Fix
IDE0090
: Simplifynew
expression part 3 (#14201) (Thanks @xtqqczze!) - Enable
SA1106
: Code should not contain empty statements (#13964) (Thanks @xtqqczze!) - Code performance fixes follow-up (#14207) (Thanks @xtqqczze!)
- Remove uninformative comments (#14199) (Thanks @xtqqczze!)
- Fix
IDE0090
: Simplifynew
expression part 1 (#14027) (Thanks @xtqqczze!) - Enable
SA1517
: Code should not contain blank lines at start of file (#14131) (Thanks @xtqqczze!) - Enable
SA1131
: Use readable conditions (#14132) (Thanks @xtqqczze!) - Enable
SA1507
: Code should not contain multiple blank lines in a row (#14136) (Thanks @xtqqczze!) - Enable
SA1516
Elements should be separated by blank line (#14137) (Thanks @xtqqczze!) - Enable
IDE0031
: Null check can be simplified (#13548) (Thanks @xtqqczze!) - Enable
CA1065
: Do not raise exceptions in unexpected locations (#14117) (Thanks @xtqqczze!) - Enable
CA1000
: Do not declarestatic
members on generic types (#14097) (Thanks @xtqqczze!)
Tools
- Fixing formatting in
Reset-PWSHSystemPath.ps1
(#13689) (Thanks @dgoldman-msft!)
Tests
Build and Packaging Improvements
- Fix a typo in the
Get-ChangeLog
function (#14129) - Update
README
andmetadata.json
for7.2.0-preview.1
release (#14104) - Bump
NJsonSchema
from10.2.2
to10.3.1
(#14040) - Move windows package signing to use ESRP (#14060)
- Use one feed in each
nuget.config
in official builds (#14363) - Fix path signed RPMs are uploaded from in release build (#14424)
- Add
Microsoft.PowerShell.MarkdownRender
to the package reference list (#14386) - Fix issue with unsigned build (#14367)
- Move macOS and nuget to ESRP signing (#14324)
- Fix nuget packaging to scrub
NullableAttribute
(#14344) - Bump
Microsoft.NET.Test.Sdk
from 16.8.0 to 16.8.3 (#14310) - Bump
Markdig.Signed
from 0.22.0 to 0.22.1 (#14305) - Bump
Microsoft.ApplicationInsights
from 2.15.0 to 2.16.0 (#14031) - Move Linux to ESRP signing (#14210)
Documentation and Help Content
- Fix example
nuget.config
(#14349) - Fix a broken link in Code Guidelines doc (#14314) (Thanks @iSazonov!)
SHA256 Hashes of the release artifacts
- powershell-7.2.0-preview.2-linux-alpine-x64.tar.gz
- 5B590BFC0CF59030DD4DE216139052F66AEB870CDD8A479562504A6630399D28
- powershell-7.2.0-preview.2-linux-arm32.tar.gz
- 2B6FB132389E221F404E130DAF90F808F31CDF1D681DB744E19FD3879F495CBC
- powershell-7.2.0-preview.2-linux-arm64.tar.gz
- 55BE80A8C58BAFF3515E543BD739BC7FCA3D917A3BA9AF0E22435DF365F20F24
- powershell-7.2.0-preview.2-linux-x64.tar.gz
- 983CBF0EBD3859E5250E8FACDB13C0D51B3604E9115CA3DE674313E0550A049B
- powershell-7.2.0-preview.2-linux-x64-fxdependent.tar.gz
- 9E9109199221E2871034479F94111B5D365216BBC690D5FADB2B084B0EFC2973
- powershell-7.2.0-preview.2-osx-x64.pkg
- BBE8CA1FFE84DEA2F20CF0C927238500565065233DC9FFCB950B9AEB744A97FC
- powershell-7.2.0-preview.2-osx-x64.tar.gz
- 5D6EAC578483A5927CAF0B1E94A424220423003B67596D1D5F4AE2962A400609
- PowerShell-7.2.0-preview.2-win-arm32.zip
- 6F53B9E27763ED6F765DAF66C845563378960DCBEB6E0977603D43B3569D39E5
- PowerShell-7.2.0-preview.2-win-arm64.zip
- A277599D398CC67EBCD0FE03B78FF196594763DFD94ADE85D2B3CD4587B179F1
- PowerShell-7.2.0-preview.2-win-fxdependent.zip
- C5C9902C4246D7F5FCD7D2EFF3610FA52CBAAA7599B45C1BD2244232985B5F34
- PowerShell-7.2.0-preview.2-win-fxdependentWinDesktop.zip
- 86BBE3DBB65245AACEDDC3B4818DC198946110CE4C36FA092282319BC90A2B51
- PowerShell-7.2.0-preview.2-win-x64.msi
- 4B4C316A5A8F017A0D8AA6B914F32FBA30284BA098EED1AC93990B962CE16029
- PowerShell-7.2.0-preview.2-win-x64.zip
- 20EC871E04D97E74214241D54D9805A41C738D8DDA09B5C91E951FCF52E2DC00
- PowerShell-7.2.0-preview.2-win-x86.msi
- A3332DDE1B2187A85F9FFBFA32769A77819722B9A310B502F132276D10EB8525
- PowerShell-7.2.0-preview.2-win-x86.zip
- 510C6A62B9EB86476E716FD9C592DC7E5FD7D48297A9B43412595A6640AFE624
- powershell-preview_7.2.0-preview.2-1.debian.10_amd64.deb
- 308CAA1A2E4B3AF9F0F10ECB79C6ED72F7FF346FC69ADC671B9B28D9AEB219CF
- powershell-preview_7.2.0-preview.2-1.debian.11_amd64.deb
- 35CB3809F6575C224E8C299A928BAA7B1F382044D1E75835B05C499CEEDC052C
- powershell-preview_7.2.0-preview.2-1.debian.9_amd64.deb
- 60907CE051436E0D2ECFCB2AC93E68761591CE3E284362E6348BB7F8339E767F
- powershell-preview_7.2.0-preview.2-1.ubuntu.16.04_amd64.deb
- 0AE9F8B699EA75DB7B712A4AF638A90DE3A36D133A5AF9AB567BAD105F3D438E
- powershell-preview_7.2.0-preview.2-1.ubuntu.18.04_amd64.deb
- BD47DF9F6BDE4ECE26C4C702CE2CBB35932D4989E5FF8535A618215E0E22A68F
- powershell-preview_7.2.0-preview.2-1.ubuntu.20.04_amd64.deb
- 6196BA4EBCC16E66D20A6CF31D103898168EDD2A32E11B8F79D149A95021BD23
- powershell-preview-7.2.0_preview.2-1.centos.8.x86_64.rpm
- EF8F95DF5B6525F45DD996CF8331A5B98DD78C70910C4110EF704C6316E56CCA
- powershell-preview-7.2.0_preview.2-1.rhel.7.x86_64.rpm
- EAB62EB66240B1CD91C8303CEB4319C69427407B7F6451B36D3734977250BEA5