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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Scopes.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
description: Explains the concept of scope in PowerShell and shows how to set and change the scope of elements.
Locale: en-US
ms.date: 07/22/2024
ms.date: 02/02/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Scopes
---
# about_Scopes

## Short description

Explains the concept of scope in PowerShell and shows how to set and change
the scope of elements.

Expand All @@ -32,8 +33,8 @@ The following are the basic rules of scope:
scopes are child scopes of that parent.
- An item is visible in the scope that it was created and in any child scopes,
unless you explicitly make it private.
- You can declare variables, aliases, functions, and PowerShell drives for a
scope outside of the current scope.
- Using scope modifiers, you can declare variables, aliases, functions, and
PowerShell drives for a scope outside of the current scope.
- An item that you created within a scope can be changed only in the scope in
which it was created, unless you explicitly specify a different scope.
- When code running in a runspace references an item, PowerShell searches the
Expand Down Expand Up @@ -259,8 +260,7 @@ the following contexts:
**ComputerName**, **HostName**, **SSHConnection** or **Session** parameters
(remote session)
- Background jobs, started with `Start-Job` (out-of-process session)
- Thread jobs, started via `Start-ThreadJob` or `ForEach-Object -Parallel`
(separate thread session)
- Thread jobs, started via `Start-ThreadJob` (separate thread session)

Depending on the context, embedded variable values are either independent
copies of the data in the caller's scope or references to it. In remote and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
description: Explains the concept of scope in PowerShell and shows how to set and change the scope of elements.
Locale: en-US
ms.date: 07/22/2024
ms.date: 02/02/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Scopes
---
# about_Scopes

## Short description

Explains the concept of scope in PowerShell and shows how to set and change
the scope of elements.

Expand All @@ -32,8 +33,8 @@ The following are the basic rules of scope:
scopes are child scopes of that parent.
- An item is visible in the scope that it was created and in any child scopes,
unless you explicitly make it private.
- You can declare variables, aliases, functions, and PowerShell drives for a
scope outside of the current scope.
- Using scope modifiers, you can declare variables, aliases, functions, and
PowerShell drives for a scope outside of the current scope.
- An item that you created within a scope can be changed only in the scope in
which it was created, unless you explicitly specify a different scope.
- When code running in a runspace references an item, PowerShell searches the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains the concept of scope in PowerShell and shows how to set and change the scope of elements.
Locale: en-US
ms.date: 07/22/2024
ms.date: 02/02/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Scopes
Expand Down Expand Up @@ -33,8 +33,8 @@ The following are the basic rules of scope:
scopes are child scopes of that parent.
- An item is visible in the scope that it was created and in any child scopes,
unless you explicitly make it private.
- You can declare variables, aliases, functions, and PowerShell drives for a
scope outside of the current scope.
- Using scope modifiers, you can declare variables, aliases, functions, and
PowerShell drives for a scope outside of the current scope.
- An item that you created within a scope can be changed only in the scope in
which it was created, unless you explicitly specify a different scope.
- When code running in a runspace references an item, PowerShell searches the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains the concept of scope in PowerShell and shows how to set and change the scope of elements.
Locale: en-US
ms.date: 07/22/2024
ms.date: 02/02/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Scopes
Expand Down Expand Up @@ -33,8 +33,8 @@ The following are the basic rules of scope:
scopes are child scopes of that parent.
- An item is visible in the scope that it was created and in any child scopes,
unless you explicitly make it private.
- You can declare variables, aliases, functions, and PowerShell drives for a
scope outside of the current scope.
- Using scope modifiers, you can declare variables, aliases, functions, and
PowerShell drives for a scope outside of the current scope.
- An item that you created within a scope can be changed only in the scope in
which it was created, unless you explicitly specify a different scope.
- When code running in a runspace references an item, PowerShell searches the
Expand Down