Skip to content

Commit d8537a0

Browse files
committed
Standardize scriptblock and statement terminology
1 parent ca6df6b commit d8537a0

File tree

354 files changed

+2777
-2665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+2777
-2665
lines changed

reference/5.1/CimCmdlets/Register-CimIndicationEvent.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
---
2-
external help file: Microsoft.Management.Infrastructure.CimCmdlets.dll-Help.xml
3-
Locale: en-US
4-
Module Name: CimCmdlets
5-
ms.date: 01/16/2026
6-
no-loc: [-Forward]
7-
online version: https://learn.microsoft.com/powershell/module/cimcmdlets/register-cimindicationevent?view=powershell-5.1&WT.mc_id=ps-gethelp
8-
schema: 2.0.0
9-
aliases:
10-
- rcie
11-
title: Register-CimIndicationEvent
2+
ms.date: 01/18/2026
123
---
134
# Register-CimIndicationEvent
145

@@ -96,7 +87,7 @@ Register-CimIndicationEvent -Query $query -SourceIdentifier "Timer"
9687
### Example 3: Run a script when the event arrives
9788

9889
This example shows how to use an action in response to an event. The variable `$action` holds the
99-
script block for **Action**, which uses the `$Event` variable to access the event received from CIM.
90+
scriptblock for **Action**, which uses the `$Event` variable to access the event received from CIM.
10091

10192
```powershell
10293
$action = {
@@ -137,11 +128,11 @@ Get-Event -SourceIdentifier "ProcessStarted"
137128

138129
Specifies the commands that handle the events. The commands specified by this parameter run when an
139130
event is raised, instead of sending the event to the event queue. Enclose the commands in braces
140-
(`{}`) to create a script block.
131+
(`{}`) to create a scriptblock.
141132

142-
The script block specified with **Action** can include the `$Event`, `$EventSubscriber`, `$Sender`,
133+
The scriptblock specified with **Action** can include the `$Event`, `$EventSubscriber`, `$Sender`,
143134
`$SourceEventArgs`, and `$SourceArgs` automatic variables, which provide information about the event
144-
to the **Action** script block. For more information, see
135+
to the **Action** scriptblock. For more information, see
145136
[About Automatic Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
146137

147138
```yaml
@@ -419,3 +410,6 @@ This cmdlet returns an **EventSubscription** object.
419410
[New-CimSession](New-CimSession.md)
420411

421412
[about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md)
413+
414+
415+

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
2-
description: About topics cover a range of concepts about PowerShell.
3-
Help Version: 6.0
4-
Locale: en-US
5-
ms.date: 04/01/2025
6-
title: About topics
2+
ms.date: 01/18/2026
73
---
84
# About topics
95

@@ -496,7 +492,7 @@ special meaning in PowerShell.
496492

497493
### [about_Return](about_Return.md)
498494

499-
Exits the current scope, which can be a function, script, or script block.
495+
Exits the current scope, which can be a function, script, or scriptblock.
500496

501497
### [about_Run_With_PowerShell](about_Run_With_PowerShell.md)
502498

@@ -510,7 +506,7 @@ scope of elements.
510506

511507
### [about_Script_Blocks](about_Script_Blocks.md)
512508

513-
Defines what a script block is and explains how to use script blocks in the
509+
Defines what a scriptblock is and explains how to use scriptblocks in the
514510
PowerShell programming language.
515511

516512
### [about_Script_Internationalization](about_Script_Internationalization.md)
@@ -655,3 +651,6 @@ manageable components of the modern enterprise.
655651

656652
Describes WMI Query Language (WQL), which can be used to get WMI objects in
657653
Windows PowerShell.
654+
655+
656+

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
---
2-
description: Describes arrays, which are data structures designed to store collections of items.
3-
Locale: en-US
4-
ms.date: 01/03/2025
5-
no-loc: [Count, Length, LongLength, Rank, ForEach, Clear, Default, First, Last, SkipUntil, Until, Split, Tuple]
6-
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_arrays?view=powershell-5.1&WT.mc_id=ps-gethelp
7-
schema: 2.0.0
8-
title: about_Arrays
2+
ms.date: 01/18/2026
93
---
104
# about_Arrays
115

@@ -522,7 +516,7 @@ ForEach(string methodName, object[] arguments)
522516
This method was added in PowerShell v4.
523517

524518
> [!NOTE]
525-
> The syntax requires the usage of a script block. Parentheses are optional if
519+
> The syntax requires the usage of a scriptblock. Parentheses are optional if
526520
> the scriptblock is the only parameter. Also, there must not be a space
527521
> between the method and the opening parenthesis or brace.
528522
@@ -542,7 +536,7 @@ $a.ForEach({ $_ * $_})
542536
```
543537

544538
Just like the **ArgumentList** parameter of `ForEach-Object`, the `arguments`
545-
parameter allows the passing of an array of arguments to a script block
539+
parameter allows the passing of an array of arguments to a scriptblock
546540
configured to accept them.
547541

548542
For more information about the behavior of **ArgumentList**, see
@@ -601,7 +595,7 @@ THREE
601595
```
602596

603597
Just like the **ArgumentList** parameter of `ForEach-Object`, the `arguments`
604-
parameter allows the passing of an array of values to a script block configured
598+
parameter allows the passing of an array of values to a scriptblock configured
605599
to accept them.
606600

607601
> [!NOTE]
@@ -625,7 +619,7 @@ Where(scriptblock expression[, WhereOperatorSelectionMode mode
625619
```
626620

627621
> [!NOTE]
628-
> The syntax requires the usage of a script block. Parentheses are optional if
622+
> The syntax requires the usage of a scriptblock. Parentheses are optional if
629623
> the scriptblock is the only parameter. Also, there must not be a space
630624
> between the method and the opening parenthesis or brace.
631625
@@ -701,7 +695,7 @@ $logs.Where({$_.CreationTime -gt $h}, 'Last', 5)
701695
#### SkipUntil
702696

703697
The `SkipUntil` mode skips all objects in a collection until an object passes
704-
the script block expression filter. It then returns **ALL** remaining
698+
the scriptblock expression filter. It then returns **ALL** remaining
705699
collection items without testing them. _Only one passing item is tested_.
706700

707701
This means the returned collection contains both _passing_ and
@@ -723,7 +717,7 @@ localhost
723717
#### Until
724718

725719
The `Until` mode inverts the `SkipUntil` mode. It returns **ALL** items in a
726-
collection until an item passes the script block expression. Once an item
720+
collection until an item passes the scriptblock expression. Once an item
727721
_passes_ the scriptblock expression, the `Where()` method stops processing
728722
items.
729723

@@ -1115,3 +1109,6 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
11151109
[12]: about_Splatting.md#splatting-with-arrays
11161110
[13]: about_While.md
11171111
[14]: https://wikipedia.org/wiki/Row-_and_column-major_order
1112+
1113+
1114+

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

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
---
2-
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
3-
Locale: en-US
4-
ms.date: 01/07/2025
5-
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline, PSEventArgs, PSEventSubscriber, PSEdition]
6-
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-5.1&WT.mc_id=ps-gethelp
7-
schema: 2.0.0
8-
title: about_Automatic_Variables
2+
ms.date: 01/18/2026
93
---
10-
114
# about_Automatic_Variables
125

136
## Short description
@@ -135,7 +128,7 @@ For more information, see [about_PSItem][67].
135128
### `$args`
136129

137130
Contains an array of values for undeclared parameters that are passed to a
138-
function, script, or script block. When you create a function, you can declare
131+
function, script, or scriptblock. When you create a function, you can declare
139132
the parameters with the `param` keyword or by adding a comma-separated list of
140133
parameters in parentheses after the function name.
141134

@@ -172,7 +165,7 @@ processed. This variable is populated only within the `Action` block of an
172165
event registration command, such as `Register-ObjectEvent`. The value of this
173166
variable is the same object that the `Get-Event` cmdlet returns. You can use
174167
the properties of the `Event` variable, such as `$Event.TimeGenerated`, in an
175-
`Action` script block.
168+
`Action` scriptblock.
176169

177170
### `$EventArgs`
178171

@@ -232,8 +225,8 @@ display or change the properties of the host, such as `$Host.Version` or
232225
### `$input`
233226

234227
Contains an enumerator that enumerates all input that's passed to a function.
235-
The `$input` variable is available only to functions, script blocks (which
236-
are unnamed functions), and script files (which are saved script blocks).
228+
The `$input` variable is available only to functions, scriptblocks (which
229+
are unnamed functions), and script files (which are saved scriptblocks).
237230

238231
- In a function without a `begin`, `process`, or `end` block, the `$input`
239232
variable enumerates the collection of all input to the function.
@@ -248,7 +241,7 @@ are unnamed functions), and script files (which are saved script blocks).
248241

249242
> [!NOTE]
250243
> You can't use the `$input` variable inside both the `process` block and the
251-
> `end` block in the same function or script block.
244+
> `end` block in the same function or scriptblock.
252245
253246
Since `$input` is an enumerator, accessing any of its properties causes
254247
`$input` to no longer be available. You can store `$input` in another variable
@@ -336,7 +329,7 @@ Contains information about the current command, such as the name, parameters,
336329
parameter values, and information about how the command was started, called, or
337330
invoked, such as the name of the script that called the current command.
338331

339-
`$MyInvocation` is populated only for scripts, function, and script blocks. You
332+
`$MyInvocation` is populated only for scripts, function, and scriptblocks. You
340333
can use the information in the **System.Management.Automation.InvocationInfo**
341334
object that `$MyInvocation` returns in the current script, such as the name of
342335
a function (`$MyInvocation.MyCommand.Name`) to identify the current command.
@@ -650,11 +643,11 @@ and change the current loop iteration. For more information, see
650643

651644
### `$this`
652645

653-
The `$this` variable is used in script blocks that extend classes to refer to
646+
The `$this` variable is used in scriptblocks that extend classes to refer to
654647
the instance of the class itself.
655648

656649
PowerShell's Extensible Type System (ETS) allows you to add properties to
657-
classes using script blocks. In a script block that defines a script property
650+
classes using scriptblocks. In a scriptblock that defines a script property
658651
or script method, the `$this` variable refers to an instance of object of the
659652
class that's being extended. For example, PowerShell uses ETS to add the
660653
**BaseName** property to the **FileInfo** class.
@@ -676,7 +669,7 @@ In a PowerShell class, the `$this` variable refers to the instance object of
676669
the class itself, allowing access to properties and methods defined in the
677670
class. For more information, see [about_Classes][52].
678671

679-
The `$this` variable is also used by .NET event classes that take script blocks
672+
The `$this` variable is also used by .NET event classes that take scriptblocks
680673
as delegates for the event handler. In this scenario, `$this` represents the
681674
object originating the event, known as the event sender.
682675

@@ -1115,3 +1108,6 @@ Default (Current): End
11151108
[75]: xref:System.Collections.IEnumerator.Current
11161109
[76]: xref:System.Collections.IEnumerator.MoveNext
11171110
[77]: xref:System.Collections.IEnumerator.Reset
1111+
1112+
1113+

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
---
2-
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
3-
Locale: en-US
4-
ms.date: 04/29/2025
5-
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-5.1&WT.mc_id=ps-gethelp
6-
schema: 2.0.0
7-
title: about_Break
2+
ms.date: 01/18/2026
83
---
94
# about_Break
105

@@ -219,8 +214,8 @@ This means that functions and scripts that inadvertently use a `break` outside
219214
of an enclosing construct that supports it can inadvertently terminate their
220215
_callers_.
221216

222-
Using `break` inside a pipeline `break`, such as a `ForEach-Object` script
223-
block, not only exits the pipeline, it potentially terminates the entire
217+
Using `break` inside a pipeline `break`, such as a `ForEach-Object`
218+
scriptblock, not only exits the pipeline, it potentially terminates the entire
224219
runspace.
225220

226221
## See also
@@ -234,3 +229,6 @@ runspace.
234229
- [about_Trap](about_Trap.md)
235230
- [about_Try_Catch_Finally](about_Try_Catch_Finally.md)
236231
- [about_While](about_While.md)
232+
233+
234+

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
---
2-
description: PowerShell provides the ability to dynamically add new properties and alter the formatting of objects output to the pipeline.
3-
Locale: en-US
4-
ms.date: 01/13/2026
5-
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_calculated_properties?view=powershell-5.1&WT.mc_id=ps-gethelp
6-
schema: 2.0.0
7-
title: about_Calculated_Properties
2+
ms.date: 01/18/2026
83
---
94
# about_Calculated_Properties
105

@@ -72,7 +67,7 @@ the key-value pairs that each cmdlet supports.
7267
- `Expression`
7368

7469
- `Measure-Object`
75-
- Only supports a script block for the expression, not a hashtable.
70+
- Only supports a scriptblock for the expression, not a hashtable.
7671
- Not supported in PowerShell 5.1 and older.
7772

7873
- `Select-Object`
@@ -84,14 +79,14 @@ the key-value pairs that each cmdlet supports.
8479
- `Ascending`/`Descending` - optional
8580

8681
> [!NOTE]
87-
> The value of the `Expression` can be a script block instead of a
82+
> The value of the `Expression` can be a scriptblock instead of a
8883
> hashtable. For more information, see the [Notes][02] section.
8984
9085
## Hashtable key definitions
9186

9287
- `Name`/`Label` - Specifies the name of the property being created. You can
9388
use `Name` or its alias, `Label`, interchangeably.
94-
- `Expression` - A string or script block used to calculate the value of the
89+
- `Expression` - A string or scriptblock used to calculate the value of the
9590
new property. If the `Expression` is a string, the value is interpreted as a
9691
property name on the input object. This is a shorter option than
9792
`Expression = { $_.<PropertyName> }`.
@@ -449,7 +444,7 @@ Date Salesperson UnitsSold
449444

450445
## Notes
451446

452-
- You may specify the expression script block _directly_, as an argument,
447+
- You may specify the expression scriptblock _directly_, as an argument,
453448
rather than specifying it as the `Expression` entry in a hashtable. For
454449
example:
455450

@@ -461,17 +456,17 @@ Date Salesperson UnitsSold
461456
naming a property via the `Name` key, such as `Sort-Object`, `Group-Object`,
462457
and `Measure-Object`.
463458

464-
For cmdlets that support naming the property, the script block is converted
459+
For cmdlets that support naming the property, the scriptblock is converted
465460
to a string and used as the name of the property in the output.
466461

467-
- `Expression` script blocks run in _child_ scopes, meaning that the caller's
462+
- `Expression` scriptblocks run in _child_ scopes, meaning that the caller's
468463
variables can't be directly modified.
469464

470-
- Pipeline logic is applied to the output from `Expression` script blocks. This
465+
- Pipeline logic is applied to the output from `Expression` scriptblocks. This
471466
means that outputting a single-element array causes that array to be
472467
unwrapped.
473468

474-
- For most cmdlets, errors inside expression script blocks are quietly ignored.
469+
- For most cmdlets, errors inside expression scriptblocks are quietly ignored.
475470
For `Sort-Object`, statement-terminating and script-terminating errors are
476471
_output_ but they don't terminate the statement.
477472

@@ -504,3 +499,6 @@ Date Salesperson UnitsSold
504499
[11]: xref:Microsoft.PowerShell.Utility.Measure-Object
505500
[12]: xref:Microsoft.PowerShell.Utility.Select-Object
506501
[13]: xref:Microsoft.PowerShell.Utility.Sort-Object
502+
503+
504+

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
---
2-
description: Describes how PowerShell determines which command to run.
3-
Locale: en-US
4-
ms.date: 03/05/2024
5-
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-5.1&WT.mc_id=ps-gethelp
6-
schema: 2.0.0
7-
title: about_Command_Precedence
2+
ms.date: 01/18/2026
83
---
94
# about_Command_Precedence
105

@@ -225,7 +220,7 @@ You can also use the call operator (`&`) to run hidden commands by combining it
225220
with a call to [Get-ChildItem][13] (the alias is `dir`), `Get-Command` or
226221
[Get-Module][11].
227222

228-
The call operator executes strings and script blocks in a child scope. For more
223+
The call operator executes strings and scriptblocks in a child scope. For more
229224
information, see [about_Operators][08].
230225

231226
For example, use the following command to run the function named `Map` that's
@@ -341,3 +336,6 @@ you must add the extension to the `$Env:PATHEXT` environment variable.
341336
[13]: xref:Microsoft.PowerShell.Management.Get-ChildItem
342337
[14]: xref:Microsoft.PowerShell.Utility.Get-Date
343338
[15]: xref:Microsoft.PowerShell.Utility.Import-PSSession
339+
340+
341+

0 commit comments

Comments
 (0)