- Open Windows Terminal
- Type
notepad $profile
- If doesn't exists, creates file in ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
- Add Aliases in file
Set-Alias <Name> <Command>
# Creates drive shortcut for Work Folders, if current user account is using it
if (Test-Path "$env:USERPROFILE\Work Folders")
{
New-PSDrive -Name Work -PSProvider FileSystem -Root "$env:USERPROFILE\Work Folders" -Description "Work Folders"
function Work: { Set-Location Work: }
}
# open profile
Set-Alias -Name profile -Value "notepad $PROFILE"
The template profile file can be downloaded and used instead.