Updates from: 07/16/2021 03:16:07
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Comparison Operators (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md
Scalar examples:
``` If the input is a collection, the operators return the matching members of that
-collection and the `$Matches` automatic variable is `$null`.
+collection.
Collection examples:
Collection examples:
#Output: Bag, Beg ```
-`-match` and `-notmatch` support regex capture groups. Each time they run, they
-overwrite the `$Matches` automatic variable. When `<input>` is a collection the
-`$Matches` variable is `$null`. `$Matches` is a **Hashtable** that always has a
-key named '0', which stores the entire match. If the regular expression
-contains capture groups, the `$Matches` contains additional keys for each
-group.
+`-match` and `-notmatch` support regex capture groups. Each time they run on
+scalar input, and the `-match` result is **True**, or the `-notmatch` result is
+**False**, they overwrite the `$Matches` automatic variable. `$Matches` is a
+**Hashtable** that always has a key named '0', which stores the entire match.
+If the regular expression contains capture groups, the `$Matches` contains
+additional keys for each group.
Example:
User name:
jsmith ```
+When the `-match` result is **False**, or the `-notmatch` result is **True**,
+or when the input is a collection, the `$Matches` automatic variable is not
+overwritten. Consequently, it will contain the previously set value, or `$null`
+if the variable has not been set. When referencing `$Matches` after invoking
+one of these operators, consider verifying that the variable was set by the
+current operator invocation by using a condition statement.
+
+Example:
+
+```powershell
+if ("<version>1.0.0</version>" -match '<version>(.*?)</version>') {
+ $Matches
+}
+```
+ For details, see [about_Regular_Expressions](about_Regular_Expressions.md) and [about_Automatic_Variables](about_Automatic_Variables.md).
Microsoft.PowerShell.Management Rename Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Accept wildcard characters: True
### -LiteralPath
-Specifies a path of the item property.
+Specifies a path to the item.
Unlike the **Path** parameter, the value of **LiteralPath** is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks.
Accept wildcard characters: False
### -Path
-Specifies the path of the item to rename.
+Specifies a path to the item.
```yaml Type: System.String
Microsoft.PowerShell.Utility Measure Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 5/10/2019 Last updated : 07/15/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/measure-object?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Measure-Object
This command displays the **Minimum**, **Maximum**, and **Sum** of the sizes of
current directory, and the average size of a file in the directory. ```powershell
-Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Average
+Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Sum -Average
``` ### Example 3: Measure text in a text file
Microsoft.PowerShell.Core About Comparison Operators (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md
Scalar examples:
``` If the input is a collection, the operators return the matching members of that
-collection and the `$Matches` automatic variable is `$null`.
+collection.
Collection examples:
Collection examples:
#Output: Bag, Beg ```
-`-match` and `-notmatch` support regex capture groups. Each time they run, they
-overwrite the `$Matches` automatic variable. When `<input>` is a collection the
-`$Matches` variable is `$null`. `$Matches` is a **Hashtable** that always has a
-key named '0', which stores the entire match. If the regular expression
-contains capture groups, the `$Matches` contains additional keys for each
-group.
+`-match` and `-notmatch` support regex capture groups. Each time they run on
+scalar input, and the `-match` result is **True**, or the `-notmatch` result is
+**False**, they overwrite the `$Matches` automatic variable. `$Matches` is a
+**Hashtable** that always has a key named '0', which stores the entire match.
+If the regular expression contains capture groups, the `$Matches` contains
+additional keys for each group.
Example:
User name:
jsmith ```
+When the `-match` result is **False**, or the `-notmatch` result is **True**,
+or when the input is a collection, the `$Matches` automatic variable is not
+overwritten. Consequently, it will contain the previously set value, or `$null`
+if the variable has not been set. When referencing `$Matches` after invoking
+one of these operators, consider verifying that the variable was set by the
+current operator invocation by using a condition statement.
+
+Example:
+
+```powershell
+if ("<version>1.0.0</version>" -match '<version>(.*?)</version>') {
+ $Matches
+}
+```
+ For details, see [about_Regular_Expressions](about_Regular_Expressions.md) and [about_Automatic_Variables](about_Automatic_Variables.md).
Microsoft.PowerShell.Management Rename Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Accept wildcard characters: True
### -LiteralPath
-Specifies a path to one or more locations. The value of **LiteralPath** is used exactly as it is
+Specifies a path to the item. The value of **LiteralPath** is used exactly as it is
typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
Accept wildcard characters: False
### -Path
-Specifies the path of the item to rename.
+Specifies a path to the item.
Wildcard characters are permitted. ```yaml
Microsoft.PowerShell.Utility Measure Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Measure-Object.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 08/10/2020 Last updated : 07/15/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/measure-object?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Measure-Object
This command displays the **Minimum**, **Maximum**, and **Sum** of the sizes of
current directory, and the average size of a file in the directory. ```powershell
-Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Average
+Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Sum -Average
``` ### Example 3: Measure text in a text file
Microsoft.PowerShell.Core About Comparison Operators (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md
Scalar examples:
``` If the input is a collection, the operators return the matching members of that
-collection and the `$Matches` automatic variable is `$null`.
+collection.
Collection examples:
Collection examples:
#Output: Bag, Beg ```
-`-match` and `-notmatch` support regex capture groups. Each time they run, they
-overwrite the `$Matches` automatic variable. When `<input>` is a collection the
-`$Matches` variable is `$null`. `$Matches` is a **Hashtable** that always has a
-key named '0', which stores the entire match. If the regular expression
-contains capture groups, the `$Matches` contains additional keys for each
-group.
+`-match` and `-notmatch` support regex capture groups. Each time they run on
+scalar input, and the `-match` result is **True**, or the `-notmatch` result is
+**False**, they overwrite the `$Matches` automatic variable. `$Matches` is a
+**Hashtable** that always has a key named '0', which stores the entire match.
+If the regular expression contains capture groups, the `$Matches` contains
+additional keys for each group.
Example:
User name:
jsmith ```
+When the `-match` result is **False**, or the `-notmatch` result is **True**,
+or when the input is a collection, the `$Matches` automatic variable is not
+overwritten. Consequently, it will contain the previously set value, or `$null`
+if the variable has not been set. When referencing `$Matches` after invoking
+one of these operators, consider verifying that the variable was set by the
+current operator invocation by using a condition statement.
+
+Example:
+
+```powershell
+if ("<version>1.0.0</version>" -match '<version>(.*?)</version>') {
+ $Matches
+}
+```
+ For details, see [about_Regular_Expressions](about_Regular_Expressions.md) and [about_Automatic_Variables](about_Automatic_Variables.md).
Microsoft.PowerShell.Management Rename Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Accept wildcard characters: True
### -LiteralPath
-Specifies a path to one or more locations. The value of **LiteralPath** is used exactly as it is
+Specifies a path to the item. The value of **LiteralPath** is used exactly as it is
typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
Accept wildcard characters: False
### -Path
-Specifies the path of the item to rename.
+Specifies a path to the item.
Wildcard characters are permitted. ```yaml
Microsoft.PowerShell.Utility Measure Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Measure-Object.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 08/10/2020 Last updated : 07/15/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/measure-object?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Measure-Object
This command displays the **Minimum**, **Maximum**, and **Sum** of the sizes of
current directory, and the average size of a file in the directory. ```powershell
-Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Average
+Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Sum -Average
``` ### Example 3: Measure text in a text file
Microsoft.PowerShell.Management Rename Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Accept wildcard characters: True
### -LiteralPath
-Specifies a path to one or more locations. The value of **LiteralPath** is used exactly as it is
+Specifies a path to the item. The value of **LiteralPath** is used exactly as it is
typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
Accept wildcard characters: False
### -Path
-Specifies the path of the item to rename.
+Specifies a path to the item.
Wildcard characters are permitted. ```yaml
Microsoft.PowerShell.Utility Measure Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Measure-Object.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 08/10/2020 Last updated : 07/15/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/measure-object?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Measure-Object
This command displays the **Minimum**, **Maximum**, and **Sum** of the sizes of
current directory, and the average size of a file in the directory. ```powershell
-Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Average
+Get-ChildItem | Measure-Object -Property length -Minimum -Maximum -Sum -Average
``` ### Example 3: Measure text in a text file