How to open PowerShell in a specific folder on Windows 10
In Windows 10, navigate to a folder in File Explorer and select File > Open Windows PowerShell to start there. If that menu is unavailable, specify the folder from the Run dialog or use Set-Location in an open PowerShell session.
Open PowerShell from the current File Explorer folder
- Open File Explorer and navigate into the folder you want. If you have only selected the folder, open it so that the address bar shows that folder.
- Choose the ordinary entry under File > Open Windows PowerShell. Moving to an accessible folder and checking your location do not require administrator privileges. The menu may differ with the Windows configuration.
- In the new window, enter Get-Location and check that the path matches the folder in File Explorer.
Specify the starting folder from Run
Press Windows key+R and enter the command below in the Run dialog. The example starts Windows PowerShell in C:\Program Files. For another folder, replace the path inside the single quotes with a folder that exists.
powershell.exe -NoExit -Command "Set-Location -LiteralPath 'C:\Program Files'"
-NoExit keeps the window open after the startup command finishes. Set-Location after -Command selects the starting folder. Confirm it with Get-Location.
Microsoft’s reference for powershell.exe startup options
Change folders in an open PowerShell session
Run the two lines below in order. The single quotes keep the path with a space together. -LiteralPath treats characters such as square brackets as part of the path. When the result shows C:\Program Files, relative paths in PowerShell are resolved from that location.
Set-Location -LiteralPath 'C:\Program Files'
Get-Location
Microsoft’s Set-Location reference
If your location does not match the folder
If Get-Location shows another path, check that the folder exists and confirm the full path you entered. Specify the folder that contains the file. If you opened Windows Terminal with a Command Prompt profile, open a PowerShell tab before trying PowerShell commands.




