Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

So I'll have to set this manually, does anybody know how? There are a couple of locations, but I'd prefer to put the profile in the correct location.

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

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
share|improve this answer
    
thanks for the clear description –  KdgDev Oct 31 '09 at 5:56
    
this is a wonderful answer, Keith. –  Paul Nathan Jan 20 '10 at 21:06
add comment

Here's a PowerShell script you can use to check for the existence of these profiles, and create them if they don't exist.

http://jdhitsolutions.com/blog/2009/11/get-profiles/

share|improve this answer
    
That is extremely usefull. Thanks for the help. –  KdgDev Nov 9 '09 at 18:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.