Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

PowerShell from WiseScript

Created: 11 Apr 2014 | 3 comments

I need to execute a powershell from wisescript.  Do i need to create execute program and point to a powershell script?

Or there is more to it?

Thanks for the help.

Operating Systems:
Discussion Filed Under:

Comments 3 CommentsJump to latest comment

EdT's picture

The accepted way of running a batch file from Wisescript uses the Execute Program command to run cmd.exe as the executable, and specify /c <path to batch file> as the argument.

Running powershell scripts would follow the same logic. In this case the executable is powershell.exe and the argument is -noexit & <path to powershellscript>.

The blog post here: http://poshoholic.com/2007/09/27/invoking-a-powershell-script-from-cmdexe-or-start-run/ explains a bit more about the powershell requirements for calling scripts.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

OgeccuT 2's picture

Thank you for the responce. 

Shouldnt is be powershell.exe -file & <path to powershellscript>?

Thank you.

EdT's picture

I have not tried running Powershell from Wisescript, so I am only passing on the published experiences of others, as in the blog post I referenced in my previous reply. With some executables, the order of arguments is not important, with others is it vital. I can only suggest you give both a try, which should take a couple of minutes, and report your finding here, for the benefit of others.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.