-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Measure-Object should support a -All parameter #6278
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
By default, Measure-Object only returns a value for
Count, omittingAverage,Sum,Minimum, andMaximumunless those are each specified by analogous parameters.Given that the perf impact of finding one of those additional values is the same as finding all of them ( O(n) ), we should add a
-Allparameter thatSteps to reproduce
Expected behavior
Actual behavior
An error is thrown. But without
-All, you just get:Environment data