GIS burdGIS logo

PowerShell Here in Windows

Following on from the [command prompt here](http://www.burdgis.com/blog/view/command-prompt-here-in-windows/) post, it dawned on me that many people (myself included) might be more interested in being able to open Powershell from Windows Explorer at their current location. Once again, no need to cd (change directory) through convoluted pathways, particularly if you're working in a virtual environment.

. With command prompt it was possible to just type **"cmd"** into the address bar of Windows Explorer ![Alt cmd-searchbar](https://s3-eu-west-1.amazonaws.com/burdgis.site/images/blog/cmd_here/cmd_searchbar.png) Try this with Powershell and a Powershell window will open, but alas, at the address C:\. Holding down shift and right-clicking in the white space of Windows Explorer brings up the option of "open command window here", but no powershell option either. So what do we need to do? First things first let's update the registry to add a powershell key.

  1. Go to the windows 8 front page and type "run" (or type run in the start menu search bar in Windows 7).

    Alt open-run

  2. With the run tool open type "regedit" and then navigate to HKEY_CLASSES_ROOT\Directory\shell\ You'll see there's a few keys in there (like cmd) but no Powershell. Right-click the "Shell" folder and select new>key and call it powershell.

    Alt hkey-directory

  3. Now we have a Powershell key we can modify the key value. Right-click on "default" in the right hand pane and select "Modify...". Change the "Value Data" to "Open Powershell Here".

    Alt modify-key

  4. Right-click in the white space on the right hand pane and select New>Key and call it "command".

    Alt new-key

  5. Select the new command key ad in the right hand pane select and right-click on "default". For the value in this one we need to add the path to the PowerShell program (plus some extra bits). Tip: if you don't know the path to PowerShell on your machine, open PowerShell and type $PSHome.

    Alt ps-path

  6. Don't forget to add the extra bits and add double backslashes. The Value Data for my machine looks like this:

    C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'

Note that this will only allow you to highlight a select a folder in Windows Explorer and right-click>Open Powershell here. Better than nothing though right?

...archive

all articles
tutorials
map stories

sign-up...

Sign-up for our monthly newsletter.

What now?

If you enjoyed this post and would like to learn more about GIS or improve your skills check out our training courses. If you'd like to contribute a story, tutorial or anything else, please contact us.

Thanks for reading and if you'd like to support our content please feel free to buy us a coffee.