Skip to content

Instantly share code, notes, and snippets.

@Ushiosan23
Last active April 15, 2019 08:45
Show Gist options
  • Select an option

  • Save Ushiosan23/94fd54dd7a9c3a0d952fecb585105ffe to your computer and use it in GitHub Desktop.

Select an option

Save Ushiosan23/94fd54dd7a9c3a0d952fecb585105ffe to your computer and use it in GitHub Desktop.
Add powershell to context menu
Windows Registry Editor Version 5.00
; Open files
; Default Powershell Location C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[HKEY_CLASSES_ROOT\*\shell\Open Powershell Bash]
@="Open Powershell Here"
"Icon"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\*\shell\Open Powershell Bash\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Powershell Here"
"Icon"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Open Powershell Here"
"Icon"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment