refactorsaurusrex
2/7/2019 - 8:33 PM

How to open the Windows environment variables dialog with PowerShell

How to open the Windows environment variables dialog with PowerShell

function Get-EnvironmentVariablesDialog {
  rundll32 sysdm.cpl,EditEnvironmentVariables
}

Set-Alias EnvGui Get-EnvironmentVariablesDialog

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!