PowerShell Profile Locations

PowerShell uses different profile files depending on which Host, or application you’re using.

Below are the defaults for PowerShell 5.1

All Users, All Hosts (PowerShell console, ISE) – $PSHOME\Profile.ps1

All Users, Current Host (PowerShell console) – $PSHOME\Microsoft.PowerShell_profile.ps1

    All User, Current Host (VS Code) – $PSHOME\Microsoft.VSCode_profile.ps1

    Current User, All Hosts (PowerShell console, ISE) – $HOME\Documents\WindowsPowerShell\Profile.ps1

    Current user, Current Host (PowerShell console) – $HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

    Current user, Current Host (VS Code) – $HOME\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1

    To edit or create each of the profile files, you can use the following commands with the $Profile variable:

    Current User, Current Host – notepad $PROFILE

    Current User, Current Host – notepad $PROFILE.CurrentUserCurrentHost

    Current User, All Hosts – notepad $PROFILE.CurrentUserAllHosts

    All Users, Current Host – notepad $PROFILE.AllUsersCurrentHost

    All Users, All Hosts – notepad $PROFILE.AllUsersAllHosts


    Leave a comment