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.


Coconut01
2017-10-05T13:59:23Z
Hi,

I've just had Visual Cron upgraded to 8.2.9 (wooo) and when i've created my first job i get the following error when i try to run it. I'm using a domain account that works fine with older versions of Visual Cron and the VC service is running. I've tried restarting the service and the server with no difference. I've run the default job "Backup Settings" which doesn't use credentials and this worked fine so i suspect it's credential related. I've tried unticking the local login box and using a different domain user but still no joy. Any suggestions?

Thanks
VC error.PNG
Sponsor
Forum information
Support
2017-10-05T14:08:18Z
Please enable extended debugging and then open the Credential you use and take a screenshot.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-05T14:14:40Z
VC error 2.PNG

Thanks for the quick reply
Support
2017-10-05T14:17:54Z
Can you send a screenshot of the Task settings as well (the specific Task properties).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-05T14:21:19Z
VC error 3.PNG VC error 4.PNG

These are the only 2 tabs in the task window I've changed
Support
2017-10-05T14:29:09Z
Can you try to create a simple PS script which outputs the current user and try to run it to see if there is a general issue;

[System.Security.Principal.WindowsIdentity]::GetCurrent().Name
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-05T14:36:01Z
I created a new job with a powershell task running the powershell command you suggested. It works fine with no credential, if i add a credential it fails.
Support
2017-10-05T16:05:55Z
Originally Posted by: Coconut01 

I created a new job with a powershell task running the powershell command you suggested. It works fine with no credential, if i add a credential it fails.



So, maybe something with that user.

1. try changing the Credential to CreateProcessAsUserW

or

2. try creating a local admin user and try that
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-06T07:55:21Z
Morning,

I changed the credentials to CreateProcessAsUserW and the test powershell script works fine now thank you.

When i try to run a powershell file however it fails, although i can call the same powershell script via a cmd file and run the same script if i paste it into the powershell script text box. Does Visual Cron need extra permissions?
Support
2017-10-06T08:04:44Z
VisualCron should run as the SYSTEM account and then you should raise permissions with Credentials when needed.

You can try turning off UAC from VisualCron and reboot. And then switch back to CreateProcessWithLogonW.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-06T08:12:20Z
I'm not sure what you mean
I don't want to turn UAC off.
The pwershell script works if i paste it into VC and it works if VC calls a batch file that in turn calls the ps1 file, it doesn't work if VC runs the ps1 file.
Support
2017-10-11T11:19:48Z
Originally Posted by: Coconut01 

I'm not sure what you mean
I don't want to turn UAC off.
The pwershell script works if i paste it into VC and it works if VC calls a batch file that in turn calls the ps1 file, it doesn't work if VC runs the ps1 file.



But is the Powershell script on the same drive as VisualCron?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-11T12:20:40Z
yes, VC is installed on the same drive as the powershell script and the batch file
Support
2017-10-12T09:51:20Z
Originally Posted by: Coconut01 

I'm not sure what you mean
I don't want to turn UAC off.
The pwershell script works if i paste it into VC and it works if VC calls a batch file that in turn calls the ps1 file, it doesn't work if VC runs the ps1 file.



What exact errors do you get when VC uses the PS1 file with writing current user name?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Coconut01
2017-10-12T13:02:54Z
I've found this in the task log

ExecuteProcess("E:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 109)->System.IO.FileNotFoundException: Could not find file 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'.
File name: 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
ExecuteProcess("E:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 109)->Unhandled execution error: System.IO.FileNotFoundException: Could not find file 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'.
File name: 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
at guwpFnV83JfDxQ01Fu.EWEEOhEWhJTb9BlSI9.awJMrJJ0x(String[] )


In the path in the first line there is a double \ in between visual cron and Powershell, could this be the problem?
Support
2017-10-12T13:26:37Z
Originally Posted by: Coconut01 

I've found this in the task log

ExecuteProcess("E:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 109)->System.IO.FileNotFoundException: Could not find file 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'.
File name: 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
ExecuteProcess("E:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 109)->Unhandled execution error: System.IO.FileNotFoundException: Could not find file 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'.
File name: 'E:\Scripts\AD_Account_Expiry\Scripts\Live script\test.ps1'
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
at guwpFnV83JfDxQ01Fu.EWEEOhEWhJTb9BlSI9.awJMrJJ0x(String[] )


In the path in the first line there is a double \ in between visual cron and Powershell, could this be the problem?



No, the problem is your PS1 file. I think you are connecting remotely and to not have the PS1 file at this specifc location.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top