- Open a PS shell
- In the shell type $profile and then press Enter. This shows you the path to the profile file.
- Create the profile file. Type: new-item -path $profile -itemtype file -force
- In your new profile file enter a line like the following which is a shortcut for editing you new profile file: function pro { notepad $profile }
- Next enable execution of PowerShell scripts. Per default you cannot execute PowerShell scripts. Enabling scripts can be done with the following command: set-executionpolicy remotesigned. Under Vista this will only work if you run the PowerShell as an administrator.
- Open a new PowerShell and test your new function added previously: pro
Showing posts with label Vista. Show all posts
Showing posts with label Vista. Show all posts
Sunday, April 29, 2007
PowerShell Profiles in Vista
To enable your PowerShell Profile file under Vista do the following
Subscribe to:
Posts (Atom)
