Skip navigation
Call PowerShell from VBScript

Call PowerShell from VBScript

Q. How can I call PowerShell from VBScript?

A. Calling PowerShell from VBScript is simple through the Wscript.Shell object. For example:

Set objShell = CreateObject("Wscript.Shell")
objShell.run("powershell.exe -nologo -file <script>.ps1")

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish