Running a PowerShell Script from VBS

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 object.

Set objShell = CreateObject(“”)“powershell -executionpolicy unrestricted -file “”c:\script.ps1″””),0



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s