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.

Anders Rødland

Anders Rødland started his IT career in 2006. My main focus is MS Configuration Manager and client management, and I have passed 17 Microsoft certifications since then. My main expertise is on client management with Microsoft Endpoint Manager: Intune and Configuration Manager. I also do a lot of work on the security side with Microsoft Defender for Endpoint. In addition to my Microsoft certification, I also have an ITIL v3 Foundation certification. This is my private blog and do not represent my employer. I use this to share information that I find useful. Sharing is caring.

Leave a Reply

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