Quantcast
Channel: Scripting Blog
Viewing all articles
Browse latest Browse all 2129

PowerTip: Use Windows PowerShell to display all Environment variables

$
0
0

Summary: Doctor Scripto demonstrates how to use [System.Environment] to show all currently set environment variables

A picture containing scissors

Description automatically generated

Question: Hey Doctor Scripto, I remember in DOS if I wanted to see the values of all the Environment variables; like TEMP I could just type the SET Command. How do I do this in PowerShell?

Answer: You can do this in one line using [System.Environment] to display all of the currently set Environment variables.

[System.Environment]::GetEnvironmentVariables()

PowerShell, Doctor Scripto, PowerTip, Sean Kearney

 

The post PowerTip: Use Windows PowerShell to display all Environment variables appeared first on Scripting Blog.


Viewing all articles
Browse latest Browse all 2129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>