Create a Powershell profile

If you want that Powershell remember your aliases (and other commands) like “gh for Get-Help”,
you can create a Powershell profile script, which is automaticali executed at Powershell startup

  1. First test if a profile exist with the folowing command:
    test-path $profile
  2. If the resulte is false, use the folowing command to create a new profile
    new-item -path $profile -itemtype file -force
  3. Type notepad $profile to edit the pprofile
  4. Now you can write down all yours commands (ex. Set-Alias gh Get-Help)
    Powershell Profile

To view the location of the profile script type $profile

Leave a Reply

You must be logged in to post a comment.