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..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 @@ -29,10 +29,10 @@ 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. +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 an environment variable can't be an empty string, 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 9f1d80b23b80..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 @@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console. > 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. +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 an environment variable can't be an empty string, 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 ed057383dafe..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 @@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console. > 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. +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 an environment variable can't be an empty string, 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 8bd610c4daac..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 @@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console. > 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. +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 an environment variable can't be an empty string, 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 59476635c65e..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 @@ -37,10 +37,10 @@ add, change, clear, and delete environment variables in the current console. > 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. +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 an environment variable can't be an empty string, 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 = ''