Skip to content

Commit

Permalink
(MicrosoftDocsGH-8618) Add note to Measure-Object in 7.3
Browse files Browse the repository at this point in the history
This commit adds a note to the `Measure-Object` cmdlet reference
documentation for PowerShell 7.3 to clarify that it now only returns
an argument error when an object is missing the to-measure property
in **StrictMode** to pair with the updated implementation from
PowerShell/PowerShell#16589.
  • Loading branch information
michaeltlombardi committed Mar 8, 2022
1 parent 70da6d3 commit 186ddb5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion reference/7.3/Microsoft.PowerShell.Utility/Measure-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 07/15/2021
ms.date: 03/08/2022
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/measure-object?view=powershell-7.3&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Measure-Object
Expand Down Expand Up @@ -546,6 +546,13 @@ Otherwise, it returns a **GenericMeasureInfo** object.

## NOTES

Starting in PowerShell 7.3, `Measure-Object` does not return an error when
processing an object which is missing the property being measured except in
**StrictMode**. When `Measure-Object` processes an object which is missing the
specified property in **StrictMode** it returns a
`System.Management.Automation.PSArgumentException` error for the **Property**
argument.

## RELATED LINKS

[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Expand Down

0 comments on commit 186ddb5

Please sign in to comment.