sebnilsson.com | Liquid Development Is What I Do
Seb Nilsson

PowerShell Profile with Permanent Aliases

Powershell

If you're a PowerShell-user who manually runs scripts or binds an alias every time you open PowerShell, then there is a file you really should know about. It's the PowerShell profile-file (or actually, the six profile-files).

I use the profile-file for Current User in the console located here:

%UserProfile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

When you've ensured that this file is created you can enter PowerShell-scripts that will run every time you open your PowerShell-console.

For example you can create a PowerShell-alias for the git-command to work with just using g instead.

set-alias g git

Now I can just type g status and save many, many seconds during a long week of Git-usage.

Comments