Quickly Open PowerShell for Folder

by Mar 11, 2022

In Windows Explorer, when you navigate to a folder, you can easily open a classic cmd or a PowerShell console with the current folder set as current path.

Simply click the address bar in the Windows Explorer window and enter either cmd, powershell, or pwsh, then press ENTER.

Cmd opens a classic command line, powershell opens a Windows PowerShell console, and pwsh opens a PowerShell 7 console (if installed).

This trick fails only when there exists a folder with the name of the command. If you open your Documents folder, click the address bar, and enter “powershell”, then ENTER will open a PowerShell console only if there is not a subfolder named “PowerShell” available anywhere. Because if there is, Explorer simply opens this folder instead.

To workaround this, simply add “.exe” to the command you enter in the address bar. “powershell.exe” always opens the Windows PowerShell console with the current Explorer folder set as default path.


Twitter This Tip! ReTweet this Tip!