How to Open PowerShell in a Folder?

Are you tired of navigating through multiple folders in the command prompt just to reach your desired directory? Do you wish there were a faster and more efficient way to open PowerShell in a specific folder? I’ll walk you through several methods to quickly open PowerShell in any folder on your Windows machine.

Method 1: Open PowerShell from File Explorer

The easiest way to open PowerShell in a folder is directly from the File Explorer. Here’s how you can do it:

  1. Press the Win+E keys simultaneously to open the File Explorer.
  2. Navigate to the folder where you want to open PowerShell.
  3. Once you’re in the desired folder, click on the address bar at the top of the File Explorer window. You can also use the keyboard shortcuts Alt+D or Ctrl+L to focus on the address bar.
  4. Type powershell in the address bar and press Enter.

PowerShell will open in the current folder, ready for you to execute commands.

Pro Tip: Open PowerShell as Administrator

If you need to run PowerShell with administrative privileges, you can easily do so from the File Explorer as well:

  1. Follow steps 1-2 from the previous section to navigate to your desired folder.
  2. Hold down the Shift key and right-click on an empty space within the folder.
  3. From the context menu, select “Open PowerShell window here”.

PowerShell will now open with administrative rights in the current folder.

Check out Show Logged-In Users with PowerShell

Method 2: Use the PowerShell Context Menu

Another quick way to open PowerShell in a folder is by using the built-in context menu. Here’s how:

  1. Open the File Explorer and navigate to the folder where you want to open PowerShell.
  2. Hold down the Shift key and right-click on an empty space within the folder.
  3. From the context menu, select “Open PowerShell window here”.

PowerShell will now open in the current folder.

Method 3: Use the Windows Terminal

If you have the Windows Terminal installed, you can easily open PowerShell in a folder with just a few clicks:

  1. Open the File Explorer and navigate to the desired folder.
  2. Right-click on an empty space within the folder.
  3. From the context menu, select “Open in Terminal”.

The Windows Terminal will launch with PowerShell in the current folder.

Check out Set Password Never Expires for Local User Using PowerShell

Method 4: Create a Desktop Shortcut

For quick access to PowerShell in a specific folder, you can create a desktop shortcut:

  1. Right-click on an empty space on your desktop.
  2. Select “New” > “Shortcut”.
  3. In the “Type the location of the item” field, enter the following command, replacing <FolderPath> with the actual path to your desired folder:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "Set-Location '<FolderPath>'"
  1. Click “Next” and give the shortcut a name, then click “Finish”.

Now, whenever you double-click on the desktop shortcut, PowerShell will open in the specified folder.

Check out Set the Default Printer Using PowerShell in Windows

Method 5: Use the Run Dialog

You can also use the Run dialog to open PowerShell in a folder quickly:

  1. Press the Win+R keys to open the Run dialog.
  2. Type powershell followed by a space and the path to your desired folder, then press Enter. For example:
   powershell C:\Users\Bijay\Documents

PowerShell will now open in the specified folder.

Conclusion

In this tutorial, I’ve shown you five different methods to open PowerShell in a folder on your Windows machine. Whether you prefer using the File Explorer, context menu, Windows Terminal, desktop shortcut, or Run dialog, you now have the knowledge to quickly navigate to your desired directory and start working with PowerShell.

I hope this guide has helped open PowerShell from a folder using these methods. If you have any questions or suggestions, feel free to leave a comment below.

You may also like the following tutorials:

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.