I had a requirement for users to be able to run a PowerShell script but due to the execution policy this is disallowed.
You can of course remove this restriction by running the command set-executionpolicy unrestricted but for security reasons we want it set-up so a particular script can run but no others.
The best solution we found was to use a Visual Basic Script (VBS) which calls PowerShell with the switch -executionpolicy unrestricted in the wscript.shell object.
Set objShell = CreateObject(“Wscript.shell”)
objShell.run(“powershell -executionpolicy unrestricted -file “”c:\script.ps1″””),0