How to Run a PowerShell script inside a VBS script

To Run a PowerShell script inside a vbs script can be usefull for many reasons, and its a quick and dirty way to run PowerShell scripts in environments where execution policy normally stops you from running your scripts. A vbs wrapper script is what I use to launch PowerShell scripts in those scenarios.

This is the vbs wrapper i use to run PowerShell scripts.


Set objShell = CreateObject("")"powershell -Executionpolicy Bypass -nologo -noninteractive -file .\script.ps1 -parameter Example")

Execute: cscript Wrapper.vbs

Note: You can also use this vbs script to run other vbs scripts inside the vbs script.

Ed Wilson (Microsofts scripting guy) also have a blog post about using vbscripts to run PowerShell.