Updates from: 01/12/2022 02:15:11
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Environment Variables (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
You can also use the Item cmdlets, such as `Set-Item`, `Remove-Item`, and
the `Set-Item` cmdlet to append `;c:\temp` to the value of the `Path` environment variable, use the following syntax:
+```powershell
+Remove-Item -Path Env:Path
+```
+
+In this command, the variable is cleared. Note that the environment
+variable is referenced as an Item path and `$` is not used.
+ ```powershell Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") ```
Microsoft.PowerShell.Core About Environment Variables (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
You can also use the Item cmdlets, such as `Set-Item`, `Remove-Item`, and
the `Set-Item` cmdlet to append `;c:\temp` to the value of the `Path` environment variable, use the following syntax:
+```powershell
+Remove-Item -Path Env:Path
+```
+
+In this command, the variable is cleared. Note that the environment
+variable is referenced as an Item path and `$` is not used.
+ ```powershell Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") ```
Microsoft.PowerShell.Core About Environment Variables (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
You can also use the Item cmdlets, such as `Set-Item`, `Remove-Item`, and
the `Set-Item` cmdlet to append `;c:\temp` to the value of the `Path` environment variable, use the following syntax:
+```powershell
+Remove-Item -Path Env:Path
+```
+
+In this command, the variable is cleared. Note that the environment
+variable is referenced as an Item path and `$` is not used.
+ ```powershell Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") ```
Microsoft.PowerShell.Core About Environment Variables (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
You can also use the Item cmdlets, such as `Set-Item`, `Remove-Item`, and
the `Set-Item` cmdlet to append `;c:\temp` to the value of the `Path` environment variable, use the following syntax:
+```powershell
+Remove-Item -Path Env:Path
+```
+
+In this command, the variable is cleared. Note that the environment
+variable is referenced as an Item path and `$` is not used.
+ ```powershell Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") ```
Microsoft.PowerShell.Core About Environment Variables (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md
You can also use the Item cmdlets, such as `Set-Item`, `Remove-Item`, and
the `Set-Item` cmdlet to append `;c:\temp` to the value of the `Path` environment variable, use the following syntax:
+```powershell
+Remove-Item -Path Env:Path
+```
+
+In this command, the variable is cleared. Note that the environment
+variable is referenced as an Item path and `$` is not used.
+ ```powershell Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") ```