Enhancement to launching PowerShell scripts from Far Manager

The method of launching PowerShell scripts from Far Manager I have described previously has 2 important drawbacks:

  1. You can’t pass arguments to the script, and
  2. You can’t launch script in a separate window

Here’s how to fix this:

  1. Start regedit, open HKCR\Microsoft.PowerShellScript.1\shell\Open\command key
  2. Set it to
    "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" "-file" "%1" %*

Now you can press Shift+Enter to start PowerShell script in a new window.

As a bonus, you can now double-click .ps1 files in Windows Explorer to launch them. Why is this not a default behaviour? Most likely Microsoft decided to be extra cautious here.

Make sure you have Powershell version 2.0 or higher for this to work. How to check Powershell version.

3 thoughts on “Enhancement to launching PowerShell scripts from Far Manager

  1. That’s because I was afraid of spam and set my blog to disable comments after 1 month, sorry. I have re-enabled comments for that post.

  2. Hi Pavel,

    It looks like you are a fun of Far Manager and you also use PowerShell. You may want to take a look at the plugin FarNet and its module PowerShellFar. They allow to run PS scripts in the same session hosted inside and provide Far Manager automation and a lot of tools, related to Far and even not.

Leave a Reply

Your email address will not be published.