Link to home
Start Free TrialLog in
Avatar of jamke1
jamke1

asked on

Catch Powershell script errors in VBscript

I am calling Windows Powershell 2 scripts from VBscript using Shell command.

Set Shell = CreateObject("Wscript.Shell")
Shell.Run( "powershell.exe -noexit " & <PowerShellCommand>  )  

How can I catch errors/ exceptions from Powershell script and also pass these errors back to VBscript?

Thanks,
Naveed
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial