Skip to content

Instantly share code, notes, and snippets.

@tigawanna
Created May 29, 2024 14:54
Show Gist options
  • Save tigawanna/d7210ffab7450c52bebbbc3b3c6ed5c3 to your computer and use it in GitHub Desktop.
Save tigawanna/d7210ffab7450c52bebbbc3b3c6ed5c3 to your computer and use it in GitHub Desktop.
How to add aliases in windows powershell

In this example we'll alias pp to pnpm

  • check powerchell profile location
 echo $profile

Note

powershell <7 is usually on : C:\Users\denni\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 powershell 7+ is usually on : C:\Users\denni\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

  • add
Set-Alias -Name pp -Value pnpm 

in the Microsoft.PowerShell_profile.ps1 or Microsoft.PowerShellISE_profile.ps1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment