Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell Get All Environment Variables

Posted on November 6, 2015 By David Kittell

If you need to know some of the system variables that are already set you can run this script to get the values

Get-Childitem env:
gci env: | sort name

Once you know what variable you want you can do something like this

Write-Host "Computer:`t" $env:COMPUTERNAME
Write-Host "Domain:`t" $env:USERDOMAIN
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Windows Phone 8/8.1 – My Location

Posted on April 6, 2015

If you have Windows Phone and would like to be able easily send your location to someone the code below will be helpful. When reviewing the code you will find that it is functional but lacks a pleasant user interface, as you build this app you can add your own…

Read More

Android Contacts – Clear/Remove Notes

Posted on December 11, 2013October 26, 2015

SELECT data1 FROM data INNER JOIN mimetype ON mimetype_id = mimetypes._id WHERE mimetype LIKE "%note%" AND length(data1) > 0 UPDATE data SET data1 = NULL FROM data INNER JOIN mimetype ON mimetype_id = mimetypes._id WHERE mimetype LIKE "%note%" Originally Posted on December 11, 2013Last Updated on October 26, 2015 All…

Read More

NetSuite – SuiteScript 2.0 – Useful Functions

Posted on August 31, 2018

These first function snippets are from https://gist.github.com/W3BGUY /** * @NApiVersion 2.x * @NScriptType ScheduledScript * @NModuleScope SameAccount * * According to the documentation this is a read-only field. According to this working code and a verification from * NetSuite tech support, the documentation is wrong. Hope this helps someone out….

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes
 

Loading Comments...
 

You must be logged in to post a comment.