Prefix the variable name with env
:
$env:path
For example, if you want to print the value of environment value MINISHIFT_USERNAME
, then command will be:
$env:MINISHIFT_USERNAME
You can also enumerate all variables via the env
drive:
Get-ChildItem env:
More Related Contents:
- PowerShell output is crossing between functions
- Displaying Unicode in Powershell
- How to sort by file name the same way Windows Explorer does?
- how do I pass a range of values on the command line – passing an expression as an argument
- What type of object is $: (such as `$code:`) in Powershell?
- Parsing xml using powershell
- Powershell, File system provider, Get-ChildItem filtering… where are the official docs?
- How can I pass an argument to a PowerShell script?
- How to get disk capacity and free space of remote computer
- Executing a command stored in a variable from PowerShell
- Recursive file search using PowerShell
- PowerShell Script to Find and Replace for all Files with a Specific Extension
- How to send multipart/form-data with PowerShell Invoke-RestMethod
- Escaping the and (&) sign in Powershell
- How to run an application as “run as administrator” from the command prompt? [closed]
- Web.Config transforms outside of Microsoft MSBuild?
- Pin program to taskbar using PS in Windows 10
- Limit Get-ChildItem recursion depth
- Powershell Invoke-Sqlcmd capture verbose output
- Convert a batch-file command with complex arguments to PowerShell
- Editing shortcut (.lnk) properties with Powershell
- Confused with -Include parameter of the Get-ChildItem cmdlet
- How to convert value to KB, MB, or GB depending on digit placeholders?
- Running PowerShell as another user, and launching a script
- Powershell Join-Path showing 2 dirs in result instead of 1 – accidental script/function output
- Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)
- powershell – list local users and their groups
- Gracefully stopping in Powershell
- Upload BIG files via HTTP
- weird delay of the output of an object when followed by start-sleep (or until script end)