Home » Questions » Computers [ Ask a new question ]

Location of the powershell profile on windows 7

Location of the powershell profile on windows 7

When executing the command notepad $profile an instance of notepad opens but I get a warning that the path doesn't exist.

Asked by: Guest | Views: 316
Total answers/comments: 1
Guest [Entry]

"There are multiple profile scripts that can be created according to which hosts and how many users you wish the profile to apply to. The PowerShell 2.0 help has an about_Profiles article that goes into detail. The short version (from the docs) is:

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

Name Description
----------- -----------
$Profile Current User,Current Host
$Profile.CurrentUserCurrentHost Current User,Current Host
$Profile.CurrentUserAllHosts Current User,All Hosts
$Profile.AllUsersCurrentHost All Users, Current Host
$Profile.AllUsersAllHosts All Users, All Hosts"