What script and where I should write in order to define:
alias for ll="ls -l"alias/function cd = "original cd; ll"
So, my question has to parts where is the rc files of the Power Shell on Windows 7 and how to alias ll to ls -l and cd to cd; ll?
Create a file in the place where the power shell points when you type
$profileand press enter, if it does not exist. (For more info look here.)Also I have found a lots of good examples next to the
powershell.exein my system there is an example folder, where there is a file namedprofile.ps1with the following code:Also take into account the following problem. You may have the following error while executing the file located in
$profile:Solution:
Check the current execution-policy
To change the execution policy to allow PowerShell to execute scripts from local files, run the following command: