Showing items from Tips

How to Use CTRL+D To Close A PowerShell Window

If you’re familiar with using CTRL+D to exit out of your shell and want the same functionality for your PowerShell, here’s how to do it. Open your PowerShell profile (Documents\PowerShell\Microsoft.PowerShell_profile.ps1): notepad $PROFILE and add this line: Set-PSReadLineKeyHandler -Key Ctrl+d -Function DeleteCharOrExit That’s it. Now reload your profile (or open a new terminal):

Continue Reading