I\'m attached to the nice blue colour of the PowerShell window when you launch it from one of the pre-installed shortcuts. However, if you manually launch powershell.exe, yo
Based on @rex-hardin excellent answer, I improved the regedit content here to add an icon, and use the PowerShell native arguments to start in the right path.
The context-menu is enabled when right-clicking on a directory background, and when right-clicking directly on a directory icon.
Of course, we also run a console with blue background exactly like the default one.
.LNK" extension to %PATHEXT% environment variableThis allows system to execute files with .lnk extension (hidden extension for shortcuts)
powershell fileThis allows the powershell command to launch our shortcut from system32 folder (which is in %PATH%)
Use explorer (copy+rename) or the command-line below:
Copy-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Windows PowerShell\Windows PowerShell.lnk" "C:\Windows\System32\powershell.lnk"
powershell_here.reg file and execute it.powershell_here.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\directory\background\shell\PowerShell]
@="PowerShell Here"
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\directory\background\shell\PowerShell\command]
@="cmd.exe /c start powershell -NoExit -NoProfile -Command Set-Location -LiteralPath '%V'"
[HKEY_CLASSES_ROOT\directory\shell\PowerShell]
@="PowerShell here"
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\directory\shell\PowerShell\command]
@="cmd.exe /c start powershell -NoExit -NoProfile -Command Set-Location -LiteralPath '%L'"