Blog Post

PowerShell $env Variables

,

I was playing with containers the other day, reading a Simple Talk article on the topic, and noticed the code in PowerShell (PoSh) used the $env:xx syntax for variables. I know I’ve seen this before, but for some reason this struck me as something I knew little about.

I decided to search a bit. One of the first links was from WindowsITPro, and they had some great code: Get-ChildItem ENV:. When I run that, I get lots of information:

2017-06-14 14_59_52-powershell

There are more items, but there are some interesting ones that I think could be useful for me, especially with automation. I have a OneDrive path, my home path, the Username, and more.

I know I’ll never remember most of these, but really I just need to remember one: Get-ChildItem ENV:

Filed under: Blog Tagged: powershell, SQLNewBlogger, syndicated

Read 89 times
(2 in last 30 days)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating