-
Notifications
You must be signed in to change notification settings - Fork 398
Open
Labels
Description
The New-Object
cmdlet is basically* legacy.
Since PowerShell V3.0 (12 years ago), PowerShell supports type accelerators which perform much better, see: PowerShell scripting performance considerations / object creation.
*) Exceptions left there (e.g. with the use of the [-ComObject] <String>
parameter)
Therefore I think that it makes sense to have a AvoidNewObjectCmdlet
rule.
related: Avoid New-Object Hashtable #60
o-l-a-v and Charlieface