Run powershell script by double clicking .ps1 file

To do so registry tweaks are needed:

First, configure a PSDrive for HKEY_CLASSES_ROOT since this isn’t set up by default. The command for this is:

Now you can navigate and edit registry keys and values in HKEY_CLASSES_ROOT just like you would in the regular HKCU and HKLM PSDrives.

To configure double-clicking to launch PowerShell scripts directly:

To configure double-clicking to open PowerShell scripts in the PowerShell ISE:

To restore the default value (sets double-click to open PowerShell scripts in Notepad):

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com