Updates from: 03/30/2021 03:12:42
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Automatic Variables (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 03/15/2021 Last updated : 03/29/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Automatic_Variables
Contains the exit code of the last Windows-based program that was run.
### $Matches
-The `Matches` variable works with the `-match` and `-notmatch` operators.
+The `$Matches` variable works with the `-match` and `-notmatch` operators.
When you submit scalar input to the `-match` or `-notmatch` operator, and either one detects a match, they return a Boolean value and populate the `$Matches` automatic variable with a hash table of any string values that
For more information about the `-match` operator, see
[about_Comparison_Operators](about_comparison_operators.md). For more information on regular expressions, see [about_Regular_Expressions](about_Regular_Expressions.md).
+The `$Matches` variable also works in a `switch` statement with the `-Regex`
+parameter. It's populated the same way as the `-match` and `-notmatch` operators.
+For more information about the `switch` statement, see [about_Switch](about_Switch.md).
+ ### $MyInvocation Contains information about the current command, such as the name, parameters,
Microsoft.PowerShell.Core About Automatic Variables (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 03/15/2021 Last updated : 03/29/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Automatic_Variables
For more information about the `-match` operator, see
[about_Comparison_Operators](about_comparison_operators.md). For more information on regular expressions, see [about_Regular_Expressions](about_Regular_Expressions.md).
+The `$Matches` variable also works in a `switch` statement with the `-Regex`
+parameter. It's populated the same way as the `-match` and `-notmatch` operators.
+For more information about the `switch` statement, see [about_Switch](about_Switch.md).
+ ### $MyInvocation Contains information about the current command, such as the name, parameters,
Microsoft.PowerShell.Core About Automatic Variables (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 03/15/2021 Last updated : 03/29/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Automatic_Variables
For more information about the `-match` operator, see
[about_Comparison_Operators](about_comparison_operators.md). For more information on regular expressions, see [about_Regular_Expressions](about_Regular_Expressions.md).
+The `$Matches` variable also works in a `switch` statement with the `-Regex`
+parameter. It's populated the same way as the `-match` and `-notmatch` operators.
+For more information about the `switch` statement, see [about_Switch](about_Switch.md).
+ ### $MyInvocation Contains information about the current command, such as the name, parameters,
Microsoft.PowerShell.Core About Automatic Variables (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 03/15/2021 Last updated : 03/29/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Automatic_Variables
For more information about the `-match` operator, see
[about_Comparison_Operators](about_comparison_operators.md). For more information on regular expressions, see [about_Regular_Expressions](about_Regular_Expressions.md).
+The `$Matches` variable also works in a `switch` statement with the `-Regex`
+parameter. It's populated the same way as the `-match` and `-notmatch` operators.
+For more information about the `switch` statement, see [about_Switch](about_Switch.md).
+ ### $MyInvocation Contains information about the current command, such as the name, parameters,