Skip to content

Commit 7d769c9

Browse files
Remove unnecessarily misleading clauses w.r.t. environment variable emptiness (#10850) (#10851)
* Remove unnecessarily misleading clauses w.r.t. environment variable emptiness (#10850) * Editorial changes --------- Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
1 parent 003e7e0 commit 7d769c9

File tree

5 files changed

+50
-45
lines changed

5 files changed

+50
-45
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to access and manage environment variables in PowerShell.
33
Locale: en-US
4-
ms.date: 09/20/2023
4+
ms.date: 02/05/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Environment Variables
@@ -29,10 +29,10 @@ operating system platforms. The PowerShell environment provider lets you get,
2929
add, change, clear, and delete environment variables in the current console.
3030

3131
Environment variables, unlike other types of variables in PowerShell, are
32-
always stored as a string and can't be empty. Also unlike other variables,
33-
they're inherited by child processes, such as local background jobs and the
34-
sessions in which module members run. This makes environment variables well
35-
suited to storing values that are needed in both parent and child processes.
32+
always stored as strings. Also unlike other variables, they're inherited by
33+
child processes, such as local background jobs and the sessions in which module
34+
members run. This makes environment variables well suited to storing values
35+
that are needed in both parent and child processes.
3636

3737
On Windows, environment variables can be defined in three scopes:
3838

@@ -46,8 +46,8 @@ parent process and is constructed from the variables in the _Machine_ and
4646
_User_ scopes.
4747

4848
When you change environment variables in PowerShell, the change affects only
49-
the current session. This behavior resembles the behavior of the `Set` command
50-
in the Windows Command Shell and the `Setenv` command in UNIX-based
49+
the current session. This behavior resembles the behavior of the `set` command
50+
in the Windows Command Shell and the `setenv` command in UNIX-based
5151
environments. To change values in the Machine or User scopes, you must use the
5252
methods of the **System.Environment** class.
5353

@@ -113,8 +113,9 @@ The 'Foo' environment variable is set to: An example
113113
An example!
114114
```
115115

116-
Because an environment variable can't be an empty string, setting one to
117-
`$null` or an empty string removes it. For example:
116+
In PowerShell, an environment variable can't be set to an empty string. Setting
117+
an environment variable to `$null` or an empty string removes it from the
118+
current session. For example:
118119

119120
```powershell
120121
$Env:Foo = ''

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to access and manage environment variables in PowerShell.
33
Locale: en-US
4-
ms.date: 09/20/2023
4+
ms.date: 02/05/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Environment Variables
@@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console.
3737
> environment variables on non-Windows platforms.
3838
3939
Environment variables, unlike other types of variables in PowerShell, are
40-
always stored as a string and can't be empty. Also unlike other variables,
41-
they're inherited by child processes, such as local background jobs and the
42-
sessions in which module members run. This makes environment variables well
43-
suited to storing values that are needed in both parent and child processes.
40+
always stored as strings. Also unlike other variables, they're inherited by
41+
child processes, such as local background jobs and the sessions in which module
42+
members run. This makes environment variables well suited to storing values
43+
that are needed in both parent and child processes.
4444

4545
On Windows, environment variables can be defined in three scopes:
4646

@@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and
5454
_User_ scopes.
5555

5656
When you change environment variables in PowerShell, the change affects only
57-
the current session. This behavior resembles the behavior of the `Set` command
58-
in the Windows Command Shell and the `Setenv` command in UNIX-based
57+
the current session. This behavior resembles the behavior of the `set` command
58+
in the Windows Command Shell and the `setenv` command in UNIX-based
5959
environments. To change values in the Machine or User scopes, you must use the
6060
methods of the **System.Environment** class.
6161

@@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example
121121
An example!
122122
```
123123

124-
Because an environment variable can't be an empty string, setting one to
125-
`$null` or an empty string removes it. For example:
124+
In PowerShell, an environment variable can't be set to an empty string. Setting
125+
an environment variable to `$null` or an empty string removes it from the
126+
current session. For example:
126127

127128
```powershell
128129
$Env:Foo = ''

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to access and manage environment variables in PowerShell.
33
Locale: en-US
4-
ms.date: 09/20/2023
4+
ms.date: 02/05/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.3&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Environment Variables
@@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console.
3737
> environment variables on non-Windows platforms.
3838
3939
Environment variables, unlike other types of variables in PowerShell, are
40-
always stored as a string and can't be empty. Also unlike other variables,
41-
they're inherited by child processes, such as local background jobs and the
42-
sessions in which module members run. This makes environment variables well
43-
suited to storing values that are needed in both parent and child processes.
40+
always stored as strings. Also unlike other variables, they're inherited by
41+
child processes, such as local background jobs and the sessions in which module
42+
members run. This makes environment variables well suited to storing values
43+
that are needed in both parent and child processes.
4444

4545
On Windows, environment variables can be defined in three scopes:
4646

@@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and
5454
_User_ scopes.
5555

5656
When you change environment variables in PowerShell, the change affects only
57-
the current session. This behavior resembles the behavior of the `Set` command
58-
in the Windows Command Shell and the `Setenv` command in UNIX-based
57+
the current session. This behavior resembles the behavior of the `set` command
58+
in the Windows Command Shell and the `setenv` command in UNIX-based
5959
environments. To change values in the Machine or User scopes, you must use the
6060
methods of the **System.Environment** class.
6161

@@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example
121121
An example!
122122
```
123123

124-
Because an environment variable can't be an empty string, setting one to
125-
`$null` or an empty string removes it. For example:
124+
In PowerShell, an environment variable can't be set to an empty string. Setting
125+
an environment variable to `$null` or an empty string removes it from the
126+
current session. For example:
126127

127128
```powershell
128129
$Env:Foo = ''

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to access and manage environment variables in PowerShell.
33
Locale: en-US
4-
ms.date: 09/20/2023
4+
ms.date: 02/05/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Environment Variables
@@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console.
3737
> environment variables on non-Windows platforms.
3838
3939
Environment variables, unlike other types of variables in PowerShell, are
40-
always stored as a string and can't be empty. Also unlike other variables,
41-
they're inherited by child processes, such as local background jobs and the
42-
sessions in which module members run. This makes environment variables well
43-
suited to storing values that are needed in both parent and child processes.
40+
always stored as strings. Also unlike other variables, they're inherited by
41+
child processes, such as local background jobs and the sessions in which module
42+
members run. This makes environment variables well suited to storing values
43+
that are needed in both parent and child processes.
4444

4545
On Windows, environment variables can be defined in three scopes:
4646

@@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and
5454
_User_ scopes.
5555

5656
When you change environment variables in PowerShell, the change affects only
57-
the current session. This behavior resembles the behavior of the `Set` command
58-
in the Windows Command Shell and the `Setenv` command in UNIX-based
57+
the current session. This behavior resembles the behavior of the `set` command
58+
in the Windows Command Shell and the `setenv` command in UNIX-based
5959
environments. To change values in the Machine or User scopes, you must use the
6060
methods of the **System.Environment** class.
6161

@@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example
121121
An example!
122122
```
123123

124-
Because an environment variable can't be an empty string, setting one to
125-
`$null` or an empty string removes it. For example:
124+
In PowerShell, an environment variable can't be set to an empty string. Setting
125+
an environment variable to `$null` or an empty string removes it from the
126+
current session. For example:
126127

127128
```powershell
128129
$Env:Foo = ''

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to access and manage environment variables in PowerShell.
33
Locale: en-US
4-
ms.date: 09/20/2023
4+
ms.date: 02/05/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about Environment Variables
@@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console.
3737
> environment variables on non-Windows platforms.
3838
3939
Environment variables, unlike other types of variables in PowerShell, are
40-
always stored as a string and can't be empty. Also unlike other variables,
41-
they're inherited by child processes, such as local background jobs and the
42-
sessions in which module members run. This makes environment variables well
43-
suited to storing values that are needed in both parent and child processes.
40+
always stored as strings. Also unlike other variables, they're inherited by
41+
child processes, such as local background jobs and the sessions in which module
42+
members run. This makes environment variables well suited to storing values
43+
that are needed in both parent and child processes.
4444

4545
On Windows, environment variables can be defined in three scopes:
4646

@@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and
5454
_User_ scopes.
5555

5656
When you change environment variables in PowerShell, the change affects only
57-
the current session. This behavior resembles the behavior of the `Set` command
58-
in the Windows Command Shell and the `Setenv` command in UNIX-based
57+
the current session. This behavior resembles the behavior of the `set` command
58+
in the Windows Command Shell and the `setenv` command in UNIX-based
5959
environments. To change values in the Machine or User scopes, you must use the
6060
methods of the **System.Environment** class.
6161

@@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example
121121
An example!
122122
```
123123

124-
Because an environment variable can't be an empty string, setting one to
125-
`$null` or an empty string removes it. For example:
124+
In PowerShell, an environment variable can't be set to an empty string. Setting
125+
an environment variable to `$null` or an empty string removes it from the
126+
current session. For example:
126127

127128
```powershell
128129
$Env:Foo = ''

0 commit comments

Comments
 (0)