Run Powershell PS1 From Shell

I wanted to run Powershell scripts (PS1) files from the shell much like batch files. After searching the web I couldn't find any info on how to do this. Therefore I spent a few minutes and created a registry modification that adds an "Execute" option to the right click menu allowing one to run a PS1 file from the shell without having to create a shortcut.

I've only tested this on Windows XP. Modifying the registry can be dangerous and the following disclaimer applies: This posting is provided "AS IS" with no warranties, and confers no rights.

To install - save the following text to a .reg file on your computer and execute.

Windows Registry Editor Version 5.00





@="C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\powershell.exe -noexit &\"'%1'\""




0 comments :: Run Powershell PS1 From Shell