Skip to content

Commit 847ef5b

Browse files
call operator: reference changes since v7.3 with PSnativeCommandArgumentPassing becoming mainstream (#11071)
* Update about_Operators.md Version 7.3 made an experimental change mainstream that significantly changes how arguments are encapsulated and passed to native commands. While this normally doesn't make a difference there are enough subtle breakages documented on the Web that warrant that this change should be documented in the reference documentation and not just in files describing experimental features. * Fixing links, removing $ from preference variable and adding the paragraph to 7.5. * Add link to about_Parsing --------- Co-authored-by: Sean Wheeler <[email protected]>
1 parent b1c1a5f commit 847ef5b

5 files changed

Lines changed: 40 additions & 15 deletions

File tree

reference/5.1/Microsoft.PowerShell.Core/About/about_Operators.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the operators that are supported by PowerShell.
33
Locale: en-US
4-
ms.date: 02/26/2024
4+
ms.date: 05/07/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Operators
@@ -262,9 +262,13 @@ table. For more information, see [about_Hash_Tables][09].
262262
### Call operator `&`
263263

264264
Runs a command, script, or script block. The call operator, also known as the
265-
"invocation operator", lets you run commands that are stored in variables and
265+
_invocation operator_, lets you run commands that are stored in variables and
266266
represented by strings or script blocks. The call operator executes in a child
267-
scope. For more about scopes, see [about_Scopes][19].
267+
scope. For more about scopes, see [about_Scopes][19]. You can use this to build
268+
strings containing the command, parameters, and arguments you need, and then
269+
invoke the string as if it were a command. The strings that you create must
270+
follow the same parsing rules as a command that you type at the command line.
271+
For more information, see [about_Parsing][08].
268272

269273
This example stores a command in a string and executes it using the call
270274
operator.
@@ -603,6 +607,7 @@ properties and methods of an object, use the Static parameter of the
603607
[05]: about_Arithmetic_Operators.md
604608
[06]: about_Assignment_Operators.md
605609
[07]: about_Comparison_Operators.md
610+
[08]: about_Parsing.md
606611
[09]: about_Hash_Tables.md
607612
[12]: about_Join.md
608613
[13]: about_logical_operators.md

reference/7.2/Microsoft.PowerShell.Core/About/about_Operators.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the operators that are supported by PowerShell.
33
Locale: en-US
4-
ms.date: 02/26/2024
4+
ms.date: 05/07/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.2&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Operators
@@ -239,9 +239,13 @@ table. For more information, see [about_Hash_Tables][09].
239239
### Call operator `&`
240240

241241
Runs a command, script, or script block. The call operator, also known as the
242-
"invocation operator", lets you run commands that are stored in variables and
242+
_invocation operator_, lets you run commands that are stored in variables and
243243
represented by strings or script blocks. The call operator executes in a child
244-
scope. For more about scopes, see [about_Scopes][19].
244+
scope. For more about scopes, see [about_Scopes][19]. You can use this to build
245+
strings containing the command, parameters, and arguments you need, and then
246+
invoke the string as if it were a command. The strings that you create must
247+
follow the same parsing rules as a command that you type at the command line.
248+
For more information, see [about_Parsing][08].
245249

246250
This example stores a command in a string and executes it using the call
247251
operator.
@@ -851,6 +855,7 @@ ${a}?[0]
851855
[05]: about_Arithmetic_Operators.md
852856
[06]: about_Assignment_Operators.md
853857
[07]: about_Comparison_Operators.md
858+
[08]: about_Parsing.md
854859
[09]: about_Hash_Tables.md
855860
[10]: about_If.md
856861
[11]: about_Jobs.md

reference/7.3/Microsoft.PowerShell.Core/About/about_Operators.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the operators that are supported by PowerShell.
33
Locale: en-US
4-
ms.date: 02/26/2024
4+
ms.date: 05/07/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.3&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Operators
@@ -239,9 +239,13 @@ table. For more information, see [about_Hash_Tables][09].
239239
### Call operator `&`
240240

241241
Runs a command, script, or script block. The call operator, also known as the
242-
"invocation operator", lets you run commands that are stored in variables and
242+
_invocation operator_, lets you run commands that are stored in variables and
243243
represented by strings or script blocks. The call operator executes in a child
244-
scope. For more about scopes, see [about_Scopes][19].
244+
scope. For more about scopes, see [about_Scopes][19]. You can use this to build
245+
strings containing the command, parameters, and arguments you need, and then
246+
invoke the string as if it were a command. The strings that you create must
247+
follow the same parsing rules as a command that you type at the command line.
248+
For more information, see [about_Parsing][08].
245249

246250
This example stores a command in a string and executes it using the call
247251
operator.
@@ -851,6 +855,7 @@ ${a}?[0]
851855
[05]: about_Arithmetic_Operators.md
852856
[06]: about_Assignment_Operators.md
853857
[07]: about_Comparison_Operators.md
858+
[08]: about_Parsing.md
854859
[09]: about_Hash_Tables.md
855860
[10]: about_If.md
856861
[11]: about_Jobs.md

reference/7.4/Microsoft.PowerShell.Core/About/about_Operators.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the operators that are supported by PowerShell.
33
Locale: en-US
4-
ms.date: 02/26/2024
4+
ms.date: 05/07/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Operators
@@ -239,9 +239,13 @@ table. For more information, see [about_Hash_Tables][09].
239239
### Call operator `&`
240240

241241
Runs a command, script, or script block. The call operator, also known as the
242-
"invocation operator", lets you run commands that are stored in variables and
242+
_invocation operator_, lets you run commands that are stored in variables and
243243
represented by strings or script blocks. The call operator executes in a child
244-
scope. For more about scopes, see [about_Scopes][19].
244+
scope. For more about scopes, see [about_Scopes][19]. You can use this to build
245+
strings containing the command, parameters, and arguments you need, and then
246+
invoke the string as if it were a command. The strings that you create must
247+
follow the same parsing rules as a command that you type at the command line.
248+
For more information, see [about_Parsing][08].
245249

246250
This example stores a command in a string and executes it using the call
247251
operator.
@@ -851,6 +855,7 @@ ${a}?[0]
851855
[05]: about_Arithmetic_Operators.md
852856
[06]: about_Assignment_Operators.md
853857
[07]: about_Comparison_Operators.md
858+
[08]: about_Parsing.md
854859
[09]: about_Hash_Tables.md
855860
[10]: about_If.md
856861
[11]: about_Jobs.md

reference/7.5/Microsoft.PowerShell.Core/About/about_Operators.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the operators that are supported by PowerShell.
33
Locale: en-US
4-
ms.date: 02/26/2024
4+
ms.date: 05/07/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Operators
@@ -239,9 +239,13 @@ table. For more information, see [about_Hash_Tables][09].
239239
### Call operator `&`
240240

241241
Runs a command, script, or script block. The call operator, also known as the
242-
"invocation operator", lets you run commands that are stored in variables and
242+
_invocation operator_, lets you run commands that are stored in variables and
243243
represented by strings or script blocks. The call operator executes in a child
244-
scope. For more about scopes, see [about_Scopes][19].
244+
scope. For more about scopes, see [about_Scopes][19]. You can use this to build
245+
strings containing the command, parameters, and arguments you need, and then
246+
invoke the string as if it were a command. The strings that you create must
247+
follow the same parsing rules as a command that you type at the command line.
248+
For more information, see [about_Parsing][08].
245249

246250
This example stores a command in a string and executes it using the call
247251
operator.
@@ -851,6 +855,7 @@ ${a}?[0]
851855
[05]: about_Arithmetic_Operators.md
852856
[06]: about_Assignment_Operators.md
853857
[07]: about_Comparison_Operators.md
858+
[08]: about_Parsing.md
854859
[09]: about_Hash_Tables.md
855860
[10]: about_If.md
856861
[11]: about_Jobs.md

0 commit comments

Comments
 (0)