xxxxxxxxxx
#For Windows PowerShell
function <alias_name> {cd "C:\Users..."}
#We use `function` and not
set-alias -name <new_alias> -value <command>
#because cmdlets(cd) don't work in set-alias -value.
#NB: this is temporal and will not work when powershell is rebooted.
#To make it permanent, add it to PowerShell Profile.ps1 file.
xxxxxxxxxx
#For Windows PowerShell
set-alias -name <alias_name> -value <command>
#<alias_name> is the new alias name you want to set.
#<command> is the command you want to alias.
#NB: this is temporal and will not work when powershell is reboot.
#To make it permanent, add it to PowerShell Profile.ps1 file.
xxxxxxxxxx
// create a profile.ps1 file to set aliases
notepad $((Split-Path $profile -Parent) + "\profile.ps1")
// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit notepad.exe
// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit1 "C:\Program Files\Windows NT\Accessories\wordpad.exe"
xxxxxxxxxx
Set-Alias -Name jn -Value C:\Users\words\Anaconda3\Scripts\jupyter-notebook.exe