Skip to content

Instantly share code, notes, and snippets.

@jonlabelle
Created September 13, 2023 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonlabelle/f2a4fdd989dbfe59e444e0beaf07bcc9 to your computer and use it in GitHub Desktop.
Save jonlabelle/f2a4fdd989dbfe59e444e0beaf07bcc9 to your computer and use it in GitHub Desktop.
PowerShell Profile Paths
title subtitle author date source snippet gist notoc
PowerShell Profile Paths
Shows the various PowerShell profile paths by platform and version.
Uzma Younas
September 13, 2023
false

Windows PowerShell 5.1 (e.g. PowerShell Desktop)

Profile Path
Current User - Current Host $Home\[My]Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Current User - All Hosts $Home\[My]Documents\WindowsPowerShell\Profile.ps1
All Users - Current Host $PSHOME\Microsoft.PowerShell_profile.ps1
All Users - All Hosts $PSHOME\Profile.ps1

PowerShell 7.x (e.g. PowerShell Core)

Windows

Profile Path
Current User - Current Host $Home\[My]Documents\Powershell\Microsoft.Powershell_profile.ps1
Current User - All Hosts $Home\[My]Documents\Powershell\Profile.ps1
All Users - Current Host $PSHOME\Microsoft.Powershell_profile.ps1
All Users - All Hosts $PSHOME\Profile.ps1

Linux/macOS

Profile Path
Current User - Current Host ~/.config/powershell/Microsoft.Powershell_profile.ps1
Current User - All Hosts ~/.config/powershell/profile.ps1
All Users - Current Host /usr/local/microsoft/powershell/7/Microsoft.Powershell_profile.ps1
All Users - All Hosts /usr/local/microsoft/powershell/7/profile.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment