08/30/2016 1554 views

How to call a vbscript in powershell. I tried a few that works manually but through SCCM it does not execute the vbscript.


0 Comments   [ + ] Show comments


All Answers


It's pretty poor etiquette to post the same question when you've not received the answer you want to a previous post.

So why on God's green Earth would you need to run a VBS from a Powershell script? It would be better to translate the VBS to Powershell.

Answered 08/31/2016 by: VBScab
Red Belt

  • Why not, I do it all the time... along with cauterizing my paper-cut wounds in salt, washing them with vinegar and drying the tears from my eyes with a handkerchief soaked in onion essence...
    • Sensible lad. You'll go far...
  • Well, I posted it again because, it said the post is hidden from public view considering it a spam. Assuming public wont be able to see, I reposted it again. And thanks for answering, I can translate to powershell, I wanted to try calling the vbs. If there is an option why not use it :)
    • You dual posted so I removed the other one, your original post is still there...

SCCM handles VB Scripts no problem. Check the specifics of your script, also ensure that your command line within SCCM Application/Package has cscript or wscript preceding your script name.

Answered 08/31/2016 by: anonymous_93791
White Belt

  • Thank you.. I did use cscript.exe $Path\Uninstall.vbs
This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
invoke-expression "cscript script.vbs"
Answered 08/31/2016 by: flip1001
Fifth Degree Brown Belt

>if there is an option why not use it :)
Using that argument coupled with the fact that you're calling a script that (presumably) uninstalls something...see here!
Answered 08/31/2016 by: VBScab
Red Belt

 I went a ahead and did the supercedence in the SCCM itself.
Answered 09/06/2016 by: shamu
Senior Purple Belt