Create a Temporary Environment variable With PowerShell

This PowerShell blog post will show how to create a temporary environment variable on Windows using Powershell.

Creating environment variables is very handy when developing applications or when in need of running apps and scripts. The most common use of environment variables saves information like endpoints, access keys and more.

A temporary environment variable is only available for the session and won’t be available after the session is closed (terminal or computer restart).

Create an Environment Variable

To create an environment variable using PowerShell, run the following command.

To list all the environment variables on your machine, run

To create a permanent environment variable, use the following command.


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.