Answered by:
Open PowerShell ISE here?

Question
-
I'm looking for a powertoy / context menu shortcut to allow me to open PowerShell ISE at a folder.
Is there one available on technet, or does anyone know how to do this?
Thursday, October 15, 2015 9:32 AM
Answers
-
My variations have included using the exact path. Turns out it is the registry refresh which enables the change. Nothing to do with whether I manually edit or merge to the registry.
EDIT - that said - the ISE is not launching at that location though. Still launching at the same location
"PS C:\Users\max.russell\Documents\WindowsPowerShell\Scripts"
- Edited by max_russell Friday, October 16, 2015 12:37 PM
- Marked as answer by Elaine Jing Monday, November 9, 2015 9:34 AM
Friday, October 16, 2015 12:32 PM
All replies
-
Search and you sill find instructions on how to open a program from the menu.
It is not a PowerShell question.
You can also just set the association for the ps1 file type to the ISE.
\_(ツ)_/
Thursday, October 15, 2015 9:51 AM -
I don't know an existing tool, but poosibly you can write a skript. If you have only one explorer window open, you can get the actual path like this:
Put this in a script, run this script via a shortcut and put this shortcut into your task bar.Add-Type -AssemblyName System.Web
$shell = New-Object -ComObject Shell.Application $path = $shell.windows() | select -ExpandProperty LocationURL | foreach{$_ -replace "\\","/" -replace "file:///"}
$path = [system.web.httpUtility]::UrlDecode($path)
- Edited by hpotsirhc Thursday, October 15, 2015 10:04 AM
Thursday, October 15, 2015 10:01 AM -
Right click on a ps1 file - select "open with" - select "choose program" - set "make this the default"
This is a "Windows For Dummies" chapter three question. It does not require a script.
\_(ツ)_/
Thursday, October 15, 2015 10:11 AM -
In both your replies, you have failed to properly interpret the question and have come across poorly as a result.
This is NOT about file association with PS1 files. It is the ability to right click at a FOLDER level and open the powershell ISE at that location - much as I can currently do with PowerShelll (console). There used to be powertoys to install similar as far back as XP.
You might want to go read a Dummies book or two yourself. Now, please step aside so that people who do understand the question might answer.
Many thanks.
Thursday, October 15, 2015 1:54 PM -
-
Thanks. A bit disappointing, as it would have been really useful.Thursday, October 15, 2015 2:38 PM
-
The command line options for powershell_ise.exe do not allow you to set a path. You can set it to open files, but even that won't open the console session in the folder that the file you've specified lives in.
Mike - it works on all systems pre-Windows 8. WS2008/Windows 7/XP etc all allow us to set the default to PS_ISE.
\_(ツ)_/
Thursday, October 15, 2015 4:24 PM -
To add to the folder level context menu you will have to create a Shell extension and register it.
Here is a hack that works with all versions of WIndow:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt] @="Open With PowerShell ISE:" [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command] @="cmd.exe /c cd %1 && powershell_ise.exe"
\_(ツ)_/
- Proposed as answer by Mike Laughlin Thursday, October 15, 2015 5:05 PM
- Unproposed as answer by max_russell Friday, October 16, 2015 9:02 AM
Thursday, October 15, 2015 4:43 PM -
-
That registry edit returns "Application not found" when a folder is right-clicked, then the Open PowerShellISE context menu is selected.
I've tried several variations on that registry value, but always results in the same. This is Windows 7.
Friday, October 16, 2015 9:06 AM -
"cmd.exe /c cd %1 && powershell_ise.exe"
Use full path to powershell ise.
I hope you realize that the post was a REG file and not a request to manually edit the registry.
\_(ツ)_/
- Edited by jrv Friday, October 16, 2015 12:00 PM
Friday, October 16, 2015 11:58 AM -
My variations have included using the exact path. Turns out it is the registry refresh which enables the change. Nothing to do with whether I manually edit or merge to the registry.
EDIT - that said - the ISE is not launching at that location though. Still launching at the same location
"PS C:\Users\max.russell\Documents\WindowsPowerShell\Scripts"
- Edited by max_russell Friday, October 16, 2015 12:37 PM
- Marked as answer by Elaine Jing Monday, November 9, 2015 9:34 AM
Friday, October 16, 2015 12:32 PM -
The solution provided by others here only partially worked for me on Windows 10 Pro; it would launch the ISE but the command shell would remain open as well regardless of using /c telling it to terminate after launching powershell_ise
Below is what ended up working for me:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\powershell_ise] @="Open PowerShell ISE Here" [HKEY_CLASSES_ROOT\Directory\shell\powershell_ise\command] @="cmd.exe /s /c start /D \"%V\" powershell_ise.exe"
- Proposed as answer by l_kkea Thursday, October 25, 2018 7:54 PM
Friday, December 18, 2015 1:26 PM -
Ctrl + Shift + Mouse Right-click reveals a built-in Operating System option "Open PowerShell window here" when the right-click is performed on a folder. This works in Windows 10 Pro (and maybe earlier versions of Windows).Wednesday, January 30, 2019 2:56 PM