Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to open the Windows environment variables dialog with PowerShell

What's this?

It takes waaaay too many clicks to open the Windows environment variables dialog. Wouldn't it be nicer to open it with a quick cli command?

How to use

  1. Copy the code from profile.ps1 to your PowerShell profile script.
  2. Change the alias to your preferred value.
  3. Profit!

Credits

Thanks to this guy for sharing the command that does the magic!

function Get-EnvironmentVariablesDialog {
rundll32 sysdm.cpl,EditEnvironmentVariables
}
Set-Alias EnvGui Get-EnvironmentVariablesDialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.