From da60246706aee5e278ec78256b69244a07124700 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:14:10 -0500 Subject: [PATCH 1/2] Remove unnecessarily misleading clauses w.r.t. environment variable emptiness (#10850) --- .../About/about_Environment_Variables.md | 12 ++++++------ .../About/about_Environment_Variables.md | 12 ++++++------ .../About/about_Environment_Variables.md | 12 ++++++------ .../About/about_Environment_Variables.md | 12 ++++++------ .../About/about_Environment_Variables.md | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 9bb7b138c7fe..da65be50df3c 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -28,11 +28,11 @@ PowerShell can access and manage environment variables in any of the supported operating system platforms. The PowerShell environment provider lets you get, add, change, clear, and delete environment variables in the current console. -Environment variables, unlike other types of variables in PowerShell, are -always stored as a string and can't be empty. Also unlike other variables, -they're inherited by child processes, such as local background jobs and the -sessions in which module members run. This makes environment variables well -suited to storing values that are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are always +stored as strings. Also unlike other variables, they're inherited by child +processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values that +are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -113,7 +113,7 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because an environment variable can't be an empty string, setting one to +Because environment variables aren't usually empty strings, setting one to `$null` or an empty string removes it. For example: ```powershell diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 9f1d80b23b80..1d1ced978ef5 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are -always stored as a string and can't be empty. Also unlike other variables, -they're inherited by child processes, such as local background jobs and the -sessions in which module members run. This makes environment variables well -suited to storing values that are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are always +stored as strings. Also unlike other variables, they're inherited by child +processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values that +are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -121,7 +121,7 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because an environment variable can't be an empty string, setting one to +Because environment variables aren't usually empty strings, setting one to `$null` or an empty string removes it. For example: ```powershell diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index ed057383dafe..9c8d39d8a75a 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are -always stored as a string and can't be empty. Also unlike other variables, -they're inherited by child processes, such as local background jobs and the -sessions in which module members run. This makes environment variables well -suited to storing values that are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are always +stored as strings. Also unlike other variables, they're inherited by child +processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values that +are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -121,7 +121,7 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because an environment variable can't be an empty string, setting one to +Because environment variables aren't usually empty strings, setting one to `$null` or an empty string removes it. For example: ```powershell diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 8bd610c4daac..405b2183edf1 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are -always stored as a string and can't be empty. Also unlike other variables, -they're inherited by child processes, such as local background jobs and the -sessions in which module members run. This makes environment variables well -suited to storing values that are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are always +stored as strings. Also unlike other variables, they're inherited by child +processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values that +are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -121,7 +121,7 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because an environment variable can't be an empty string, setting one to +Because environment variables aren't usually empty strings, setting one to `$null` or an empty string removes it. For example: ```powershell diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 59476635c65e..bc3a3f69d4c1 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are -always stored as a string and can't be empty. Also unlike other variables, -they're inherited by child processes, such as local background jobs and the -sessions in which module members run. This makes environment variables well -suited to storing values that are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are always +stored as strings. Also unlike other variables, they're inherited by child +processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values that +are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -121,7 +121,7 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because an environment variable can't be an empty string, setting one to +Because environment variables aren't usually empty strings, setting one to `$null` or an empty string removes it. For example: ```powershell From 0a32fce3613b689e6b8b57f327d6b893a82d8306 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Mon, 5 Feb 2024 13:57:54 -0600 Subject: [PATCH 2/2] Editorial changes --- .../About/about_Environment_Variables.md | 21 ++++++++++--------- .../About/about_Environment_Variables.md | 21 ++++++++++--------- .../About/about_Environment_Variables.md | 21 ++++++++++--------- .../About/about_Environment_Variables.md | 21 ++++++++++--------- .../About/about_Environment_Variables.md | 21 ++++++++++--------- 5 files changed, 55 insertions(+), 50 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index da65be50df3c..d06ce08a2174 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -1,7 +1,7 @@ --- description: Describes how to access and manage environment variables in PowerShell. Locale: en-US -ms.date: 09/20/2023 +ms.date: 02/05/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Environment Variables @@ -28,11 +28,11 @@ PowerShell can access and manage environment variables in any of the supported operating system platforms. The PowerShell environment provider lets you get, add, change, clear, and delete environment variables in the current console. -Environment variables, unlike other types of variables in PowerShell, are always -stored as strings. Also unlike other variables, they're inherited by child -processes, such as local background jobs and the sessions in which module -members run. This makes environment variables well suited to storing values that -are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are +always stored as strings. Also unlike other variables, they're inherited by +child processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values +that are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -46,8 +46,8 @@ parent process and is constructed from the variables in the _Machine_ and _User_ scopes. When you change environment variables in PowerShell, the change affects only -the current session. This behavior resembles the behavior of the `Set` command -in the Windows Command Shell and the `Setenv` command in UNIX-based +the current session. This behavior resembles the behavior of the `set` command +in the Windows Command Shell and the `setenv` command in UNIX-based environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class. @@ -113,8 +113,9 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because environment variables aren't usually empty strings, setting one to -`$null` or an empty string removes it. For example: +In PowerShell, an environment variable can't be set to an empty string. Setting +an environment variable to `$null` or an empty string removes it from the +current session. For example: ```powershell $Env:Foo = '' diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 1d1ced978ef5..1a98ed5e06a5 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -1,7 +1,7 @@ --- description: Describes how to access and manage environment variables in PowerShell. Locale: en-US -ms.date: 09/20/2023 +ms.date: 02/05/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Environment Variables @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are always -stored as strings. Also unlike other variables, they're inherited by child -processes, such as local background jobs and the sessions in which module -members run. This makes environment variables well suited to storing values that -are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are +always stored as strings. Also unlike other variables, they're inherited by +child processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values +that are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and _User_ scopes. When you change environment variables in PowerShell, the change affects only -the current session. This behavior resembles the behavior of the `Set` command -in the Windows Command Shell and the `Setenv` command in UNIX-based +the current session. This behavior resembles the behavior of the `set` command +in the Windows Command Shell and the `setenv` command in UNIX-based environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class. @@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because environment variables aren't usually empty strings, setting one to -`$null` or an empty string removes it. For example: +In PowerShell, an environment variable can't be set to an empty string. Setting +an environment variable to `$null` or an empty string removes it from the +current session. For example: ```powershell $Env:Foo = '' diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 9c8d39d8a75a..8a6854815af5 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -1,7 +1,7 @@ --- description: Describes how to access and manage environment variables in PowerShell. Locale: en-US -ms.date: 09/20/2023 +ms.date: 02/05/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Environment Variables @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are always -stored as strings. Also unlike other variables, they're inherited by child -processes, such as local background jobs and the sessions in which module -members run. This makes environment variables well suited to storing values that -are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are +always stored as strings. Also unlike other variables, they're inherited by +child processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values +that are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and _User_ scopes. When you change environment variables in PowerShell, the change affects only -the current session. This behavior resembles the behavior of the `Set` command -in the Windows Command Shell and the `Setenv` command in UNIX-based +the current session. This behavior resembles the behavior of the `set` command +in the Windows Command Shell and the `setenv` command in UNIX-based environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class. @@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because environment variables aren't usually empty strings, setting one to -`$null` or an empty string removes it. For example: +In PowerShell, an environment variable can't be set to an empty string. Setting +an environment variable to `$null` or an empty string removes it from the +current session. For example: ```powershell $Env:Foo = '' diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 405b2183edf1..6b632871f17d 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -1,7 +1,7 @@ --- description: Describes how to access and manage environment variables in PowerShell. Locale: en-US -ms.date: 09/20/2023 +ms.date: 02/05/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Environment Variables @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are always -stored as strings. Also unlike other variables, they're inherited by child -processes, such as local background jobs and the sessions in which module -members run. This makes environment variables well suited to storing values that -are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are +always stored as strings. Also unlike other variables, they're inherited by +child processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values +that are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and _User_ scopes. When you change environment variables in PowerShell, the change affects only -the current session. This behavior resembles the behavior of the `Set` command -in the Windows Command Shell and the `Setenv` command in UNIX-based +the current session. This behavior resembles the behavior of the `set` command +in the Windows Command Shell and the `setenv` command in UNIX-based environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class. @@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because environment variables aren't usually empty strings, setting one to -`$null` or an empty string removes it. For example: +In PowerShell, an environment variable can't be set to an empty string. Setting +an environment variable to `$null` or an empty string removes it from the +current session. For example: ```powershell $Env:Foo = '' diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index bc3a3f69d4c1..16f3224232fd 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -1,7 +1,7 @@ --- description: Describes how to access and manage environment variables in PowerShell. Locale: en-US -ms.date: 09/20/2023 +ms.date: 02/05/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Environment Variables @@ -36,11 +36,11 @@ add, change, clear, and delete environment variables in the current console. > case-sensitive. For example, `$env:Path` and `$env:PATH` are different > environment variables on non-Windows platforms. -Environment variables, unlike other types of variables in PowerShell, are always -stored as strings. Also unlike other variables, they're inherited by child -processes, such as local background jobs and the sessions in which module -members run. This makes environment variables well suited to storing values that -are needed in both parent and child processes. +Environment variables, unlike other types of variables in PowerShell, are +always stored as strings. Also unlike other variables, they're inherited by +child processes, such as local background jobs and the sessions in which module +members run. This makes environment variables well suited to storing values +that are needed in both parent and child processes. On Windows, environment variables can be defined in three scopes: @@ -54,8 +54,8 @@ parent process and is constructed from the variables in the _Machine_ and _User_ scopes. When you change environment variables in PowerShell, the change affects only -the current session. This behavior resembles the behavior of the `Set` command -in the Windows Command Shell and the `Setenv` command in UNIX-based +the current session. This behavior resembles the behavior of the `set` command +in the Windows Command Shell and the `setenv` command in UNIX-based environments. To change values in the Machine or User scopes, you must use the methods of the **System.Environment** class. @@ -121,8 +121,9 @@ The 'Foo' environment variable is set to: An example An example! ``` -Because environment variables aren't usually empty strings, setting one to -`$null` or an empty string removes it. For example: +In PowerShell, an environment variable can't be set to an empty string. Setting +an environment variable to `$null` or an empty string removes it from the +current session. For example: ```powershell $Env:Foo = ''