Skip to content

Instantly share code, notes, and snippets.

@orthlus
Last active May 7, 2024 17:50
Show Gist options
  • Save orthlus/728e8de8d75b4abcd12506fb69bc0448 to your computer and use it in GitHub Desktop.
Save orthlus/728e8de8d75b4abcd12506fb69bc0448 to your computer and use it in GitHub Desktop.
powershell exit with ctrl+D

Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit

run $Profile, create this path (dir and file), add in file some startup scripts https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.4

if access denied (during start powershell), this help - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4

me helped run as admin this command Set-ExecutionPolicy -ExecutionPolicy Bypass


instead profile file can be used things like "on startup scripts" in terminal like "MobaXterm"


also you can sign ps1 scprint in $Profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment