Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions reference/5.1/CimCmdlets/Register-CimIndicationEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.Management.Infrastructure.CimCmdlets.dll-Help.xml
Locale: en-US
Module Name: CimCmdlets
ms.date: 01/16/2026
ms.date: 01/18/2026
no-loc: [-Forward]
online version: https://learn.microsoft.com/powershell/module/cimcmdlets/register-cimindicationevent?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -96,7 +96,7 @@ Register-CimIndicationEvent -Query $query -SourceIdentifier "Timer"
### Example 3: Run a script when the event arrives

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

```powershell
$action = {
Expand Down Expand Up @@ -137,11 +137,11 @@ Get-Event -SourceIdentifier "ProcessStarted"

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

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

```yaml
Expand Down Expand Up @@ -419,3 +419,4 @@ This cmdlet returns an **EventSubscription** object.
[New-CimSession](New-CimSession.md)

[about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md)

9 changes: 6 additions & 3 deletions reference/5.1/Microsoft.PowerShell.Core/About/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: About topics cover a range of concepts about PowerShell.
Help Version: 6.0
Locale: en-US
ms.date: 04/01/2025
ms.date: 01/18/2026
title: About topics
---
# About topics
Expand Down Expand Up @@ -496,7 +496,7 @@ special meaning in PowerShell.

### [about_Return](about_Return.md)

Exits the current scope, which can be a function, script, or script block.
Exits the current scope, which can be a function, script, or scriptblock.

### [about_Run_With_PowerShell](about_Run_With_PowerShell.md)

Expand All @@ -510,7 +510,7 @@ scope of elements.

### [about_Script_Blocks](about_Script_Blocks.md)

Defines what a script block is and explains how to use script blocks in the
Defines what a scriptblock is and explains how to use scriptblocks in the
PowerShell programming language.

### [about_Script_Internationalization](about_Script_Internationalization.md)
Expand Down Expand Up @@ -655,3 +655,6 @@ manageable components of the modern enterprise.

Describes WMI Query Language (WQL), which can be used to get WMI objects in
Windows PowerShell.



17 changes: 10 additions & 7 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes arrays, which are data structures designed to store collections of items.
Locale: en-US
ms.date: 01/03/2025
ms.date: 01/18/2026
no-loc: [Count, Length, LongLength, Rank, ForEach, Clear, Default, First, Last, SkipUntil, Until, Split, Tuple]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_arrays?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -522,7 +522,7 @@ ForEach(string methodName, object[] arguments)
This method was added in PowerShell v4.

> [!NOTE]
> The syntax requires the usage of a script block. Parentheses are optional if
> The syntax requires the usage of a scriptblock. Parentheses are optional if
> the scriptblock is the only parameter. Also, there must not be a space
> between the method and the opening parenthesis or brace.

Expand All @@ -542,7 +542,7 @@ $a.ForEach({ $_ * $_})
```

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

For more information about the behavior of **ArgumentList**, see
Expand Down Expand Up @@ -601,7 +601,7 @@ THREE
```

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

> [!NOTE]
Expand All @@ -625,7 +625,7 @@ Where(scriptblock expression[, WhereOperatorSelectionMode mode
```

> [!NOTE]
> The syntax requires the usage of a script block. Parentheses are optional if
> The syntax requires the usage of a scriptblock. Parentheses are optional if
> the scriptblock is the only parameter. Also, there must not be a space
> between the method and the opening parenthesis or brace.

Expand Down Expand Up @@ -701,7 +701,7 @@ $logs.Where({$_.CreationTime -gt $h}, 'Last', 5)
#### SkipUntil

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

This means the returned collection contains both _passing_ and
Expand All @@ -723,7 +723,7 @@ localhost
#### Until

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

Expand Down Expand Up @@ -1115,3 +1115,6 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
[12]: about_Splatting.md#splatting-with-arrays
[13]: about_While.md
[14]: https://wikipedia.org/wiki/Row-_and_column-major_order



Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
Locale: en-US
ms.date: 01/07/2025
ms.date: 01/18/2026
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline, PSEventArgs, PSEventSubscriber, PSEdition]
online version: https://learn.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
---

# about_Automatic_Variables

## Short description
Expand Down Expand Up @@ -135,7 +134,7 @@ For more information, see [about_PSItem][67].
### `$args`

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

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

### `$EventArgs`

Expand Down Expand Up @@ -232,8 +231,8 @@ display or change the properties of the host, such as `$Host.Version` or
### `$input`

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

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

> [!NOTE]
> You can't use the `$input` variable inside both the `process` block and the
> `end` block in the same function or script block.
> `end` block in the same function or scriptblock.

Since `$input` is an enumerator, accessing any of its properties causes
`$input` to no longer be available. You can store `$input` in another variable
Expand Down Expand Up @@ -336,7 +335,7 @@ Contains information about the current command, such as the name, parameters,
parameter values, and information about how the command was started, called, or
invoked, such as the name of the script that called the current command.

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

### `$this`

The `$this` variable is used in script blocks that extend classes to refer to
The `$this` variable is used in scriptblocks that extend classes to refer to
the instance of the class itself.

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

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

Expand Down Expand Up @@ -1115,3 +1114,6 @@ Default (Current): End
[75]: xref:System.Collections.IEnumerator.Current
[76]: xref:System.Collections.IEnumerator.MoveNext
[77]: xref:System.Collections.IEnumerator.Reset



Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
Locale: en-US
ms.date: 04/29/2025
ms.date: 01/18/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Break
Expand Down Expand Up @@ -219,8 +219,8 @@ This means that functions and scripts that inadvertently use a `break` outside
of an enclosing construct that supports it can inadvertently terminate their
_callers_.

Using `break` inside a pipeline `break`, such as a `ForEach-Object` script
block, not only exits the pipeline, it potentially terminates the entire
Using `break` inside a pipeline `break`, such as a `ForEach-Object`
scriptblock, not only exits the pipeline, it potentially terminates the entire
runspace.

## See also
Expand All @@ -234,3 +234,4 @@ runspace.
- [about_Trap](about_Trap.md)
- [about_Try_Catch_Finally](about_Try_Catch_Finally.md)
- [about_While](about_While.md)

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: PowerShell provides the ability to dynamically add new properties and alter the formatting of objects output to the pipeline.
Locale: en-US
ms.date: 01/13/2026
ms.date: 01/18/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_calculated_properties?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Calculated_Properties
Expand Down Expand Up @@ -72,7 +72,7 @@ the key-value pairs that each cmdlet supports.
- `Expression`

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

- `Select-Object`
Expand All @@ -84,14 +84,14 @@ the key-value pairs that each cmdlet supports.
- `Ascending`/`Descending` - optional

> [!NOTE]
> The value of the `Expression` can be a script block instead of a
> The value of the `Expression` can be a scriptblock instead of a
> hashtable. For more information, see the [Notes][02] section.

## Hashtable key definitions

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

## Notes

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

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

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

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

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

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

Expand Down Expand Up @@ -504,3 +504,4 @@ Date Salesperson UnitsSold
[11]: xref:Microsoft.PowerShell.Utility.Measure-Object
[12]: xref:Microsoft.PowerShell.Utility.Select-Object
[13]: xref:Microsoft.PowerShell.Utility.Sort-Object

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how PowerShell determines which command to run.
Locale: en-US
ms.date: 03/05/2024
ms.date: 01/18/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Command_Precedence
Expand Down Expand Up @@ -225,7 +225,7 @@ You can also use the call operator (`&`) to run hidden commands by combining it
with a call to [Get-ChildItem][13] (the alias is `dir`), `Get-Command` or
[Get-Module][11].

The call operator executes strings and script blocks in a child scope. For more
The call operator executes strings and scriptblocks in a child scope. For more
information, see [about_Operators][08].

For example, use the following command to run the function named `Map` that's
Expand Down Expand Up @@ -341,3 +341,4 @@ you must add the extension to the `$Env:PATHEXT` environment variable.
[13]: xref:Microsoft.PowerShell.Management.Get-ChildItem
[14]: xref:Microsoft.PowerShell.Utility.Get-Date
[15]: xref:Microsoft.PowerShell.Utility.Import-PSSession

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes the parameters that can be used with any cmdlet.
Locale: en-US
ms.date: 01/12/2026
ms.date: 01/18/2026
no-loc: [Confirm, Debug, ErrorAction, ErrorVariable, InformationAction, InformationVariable, OutBuffer, OutVariable, PipelineVariable, ProgressAction, Verbose, WarningAction, WarningVariable, WhatIf]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -384,9 +384,9 @@ piped from while processing the next item passing through the pipeline. This
allows a command to _feed back_ its output to a previous command (or itself).

>[!NOTE]
> Advanced functions can have up to three script blocks: `begin`, `process`,
> Advanced functions can have up to three scriptblocks: `begin`, `process`,
> and `end`. When using the `PipelineVariable` parameter with advanced
> functions, only values from the first defined script block are assigned to
> functions, only values from the first defined scriptblock are assigned to
> the variable as the function runs. For more information, see
> [Advanced functions][05]. PowerShell 7.2 corrects this behavior.

Expand Down Expand Up @@ -844,3 +844,4 @@ Mode LastWriteTime Length Name
[12]: xref:Microsoft.PowerShell.Utility.Write-Error
[13]: xref:Microsoft.PowerShell.Utility.Write-Verbose
[14]: xref:Microsoft.PowerShell.Utility.Write-Warning

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes the operators that compare values in PowerShell.
Locale: en-US
ms.date: 06/20/2025
ms.date: 01/18/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Comparison_Operators
Expand Down Expand Up @@ -780,3 +780,4 @@ $a -isnot $b.GetType() # Output: True
[13]: xref:Microsoft.PowerShell.Core.Where-Object
[14]: xref:Microsoft.PowerShell.Utility.Compare-Object
[15]: /powershell/scripting/learn/glossary#scalar-value

Loading