====== PowerShell profile ====== {{tag> powershell}} ===== Setup ===== ** What's the path to my profile script? .. '' echo $profile'' ** Does it exist? .. ''Test-Path $profile'' ** Create it: .. ''New-Item -Path $profile -Type %%"%%file%%"%% -Force'' ** Inspect it: .. ''Get-Content -Path $profile'' ===== Contents ===== ** Enable +D exit: .. ''Set-PSReadlineKeyHandler -Key Ctrl+d -Function DeleteCharOrExit'' .. (''Add-Content -Path $profile -Value %%"%%Set-PSReadlineKeyHandler -Key Ctrl+d -Function DeleteCharOrExit`r`n%%"%%'')