Skip to end of banner
Go to start of banner

Create Windows Environment Variables with PowerShell

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How to create environment variables and assign values to them with PowerShell.

  1. Run PowerShell as an administrator, then enter the following command:

 

[System.Environment]::SetEnvironmentVariable("Your_Environment_Variable_Here", "your_value_here", "User")

 

·        Make sure to replace 'Your_Environment_Variable_Here' with the appropriate variable name (CONNECTED_ACU_API_PASSWORD, CONNECTED_ACU_API_VENDOR_KEY or CONNECTED_ACU_API_USER_KEY); Also, make sure to replace 'your_value_here' with the respective values for the variables.

  1. You can check if the environment variable was created by running the command below:

 

      echo $env:Your_Environment_Variable_Here

 

  1. Repeat the process for EACH of the necessary environment variables to run the code (CONNECTED_ACU_API_PASSWORD, CONNECTED_ACU_API_VENDOR_KEY, CONNECTED_ACU_API_USER_KEY).

  • No labels