Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


MikeBoBo
2013-10-30T23:50:20Z
I have a PowerShell task that runs a script file that deletes files.

The deletion prompts the user for confirmation.

I've bypassed this when running the script by adding -force after the command.

When I run the script in VC, I get the following:

Exception in Task: A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows. A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.

The script does execute correctly but the job errors and I do not get the output of the script passed into VC.
Sponsor
Forum information
Support
2013-10-31T08:04:30Z
So, some command you use is not allowed in background execution. Can't you just comment out that command?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
MikeBoBo
2013-10-31T19:08:27Z
The powershell script has a function that produces information to the second part of the script to act upon. Commenting that out would render the script useless.

Is there an option to run the powershell task in something other than background execution as that is currently greyed out.
Support
2013-11-01T08:08:01Z
You can execute the Powershell script in Foreground with Execute Task. But the number of limitations and "risks" with this are not very encouraging.

I do not fully understand what the problem really is - I assume that the script can be easily rewritten to support background execution? If you provide more details maybe we or otheru user can help you workaround that problem?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
MikeBoBo
2013-11-04T16:47:37Z
I found a way to bypass the issue using a different method.
Support
2013-11-04T16:53:35Z
Great - thanks for the feedback!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top