powershell

Output Environment Variable

Print environment variable to the console in PowerShell

Abhith Rajan
Abhith RajanJuly 25, 2022 · 1 min read · Last Updated:

If you want to print the value of an environment variable, you can use the $env:variable_name syntax.

1$env:MY_VARIABLE

Replace MY_VARIABLE with the name of the environment variable you want to print.

Abhith Rajan

Written byAbhith Rajan
Abhith Rajan is a software engineer by day and a full-stack developer by night. He's coding for almost a decade now. He codes 🧑‍💻, write ✍️, learn 📖 and advocate 👍.
Connect

Is this page helpful?

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub


Related StoriesView All