-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility module
Milestone
Description
Prerequisites
- Write a descriptive title.
- Search the existing issues.
Summary of the new feature or changed behavior
When using Measure-Object on an empty folder, the "Length" property is invalid. When in StrictMode, an error is thrown when the requested property is not found. The error message is also updated to include the specific property that is not found. The invalid property is simply ignored when not in StrictMode.
PR Context
Unless in StrictMode, missing properties are typically ignored by other commands, so the Measure-Object command should do the same. This pull-request updates the Measure-Object command to only throw a property not found error when in StrictMode and ignores the property not found when not in StrictMode. This functionality is now consistent with other PowerShell commands.
List of articles that need to be updated
Link to related PR in PowerShell/PowerShell repo
Link to related Issues in PowerShell/PowerShell repo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility module