Running PowerShell

I mostly use PowerShell for my scripting needs. However, I am so used to old command prompt that I type cmd.exe without thinking. So, instead of changing my habits, I have .bat file for each PowerShell script:

powershell script.ps1 %*

First and second parameter determine what to run and third parameter forwards all command line arguments to script.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.