Problems executing Powershell Script from Workflow
I have a VBscript that runs in a workflow using the execute batch file component. Within the VBscript I use the following line to execute a small powershell script.
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("powershell.exe -noprofile -command D:\temp\DataAreaCreate.ps1" & " " & "'" & DataArea & "'" & " " & readDL & " " & updateDL)
The VBscript runs fine without the Powershell script when pubished. When I run the vbscript in debug mode and call the Powershell script it executes fine. The problem I have is when I Publish the workflow - the Powershell Script fails to execute and there is no exception fired off.
So it works fine in Debug mode but not when Published.
Anyone have any ideas?
Filed under: Workflow Solution, Endpoint Management and Virtualization
You may/may not have answered
You may/may not have answered your own question:
https://www-secure.symantec.com/connect/forums/pub...
Nope
This is the same workflow. The vbscripts execute flawlessly. The same VBscript calls powershell and works great in debug. Powershell is the only thing that fails when Published.
Just curious... can you
Just curious... can you supply the full path to the powershell.exe in the command line (i.e. "C:\woo hoo\powershell.exe" -noprofile ... ) ? Or add the path to power shell in the system paths of the machine?
Wow - Such a simple solution.
I was looking to hard! Thanks reecardo! I put the full path in the script to the powershell executable and voila! Issue if fixed when published.
Would you like to reply?
Login or Register to post your comment.