How To Open PowerShell In A Specific Location In Windows 10

PowerShell comes pre-installed in Windows 10. You can access it from the Power User menu or you can search for it via Cortana. Both Windows 7 and 8 did not have PowerShell by default. Although Windows 10 has PowerShell, it hasn’t integrated it the same way as it has Command Prompt. You can open a Command Prompt window anywhere, in any location/folder, by holding down the Shift key and right-clicking inside it. The context menu will have an ‘Open Command window here’ option but nothing similar exists for PowerShell. Here’s how you can open PowerShell in a specific location in Windows 10.

File Explorer

This is the simplest way to open PowerShell in a specific location and it requires you make absolutely no changes to anything. Open File Explorer and navigate to the folder/location you want to open PowerShell in.

In the address bar, type ‘powershell’ and hit Enter.

Give it a second and a PowerShell window will open at that location. You can do the same for Command Prompt. Simply type CMD in the address bar and tap Enter.

Right-Click Context Menu

In order to add the ‘Open PowerShell window here’ option to the right-click context menu you have to run a PowerShell script. It’s not very difficult but if you’re looking for something simple we recommend our first solution.

The script you need to run is called StartPSFromWinExplorer and you can download it from the link below. In order to run it, login to your system with the Administrator account. Open PowerShell as the administrator. And run the script;

StartPSFromWinExplorer.ps1

You need only give PowerShell the path to the script and tap enter to run it. For example, the command I ran was;

C:UsersFatimaDownloadsStartPSFromWinExplorerStartPSFromWinExplorer.ps1

Allow PowerShell to run the script.

Once it has successfully run, right-click a folder thumbnail and you will see the ‘Open PowerShell in this Folder’ option in the context menu. I updated mine to say ‘Open PowerShell Here’ via the Registry. If you would like to do the same, read on.

Open the Windows Registry and go to

HKEY_CLASSES_ROOT> Directory>shell>powershell_shell>command

Double click the default key in this folder and replace the value with ‘Open PowerShell Here’.

That’s all it takes. You can now right-click a folder to open PowerShell in a specific location from the context menu.

Download StartPSFromWinExplorer

قالب وردپرس

About Lily Herman

Lily Herman
Lily Herman is a New York-based writer and editor. In recent months, her work has been featured in Teen Vogue, Glamour, Refinery29, Cosmopolitan, TIME, Newsweek, Fast Company, and Mashable. You can check out her website, LinkedIn, and Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *