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


GeoffAlbin
2019-04-22T14:06:14Z
I would like to alter a Visual Cron job to Disabled and Activate via Power Shell and not the GUI. Is this possible?
Sponsor
Forum information
Support
2019-04-23T08:04:17Z
I would study the Powershell samples in the API folder of installation folder. Everything you can do with the .NET API you can do with Powershell. However, we are not Powershell experts so we cannot support you with the exact lines for this but the Powershell script in the API folder should probably get you started.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GeoffAlbin
2019-04-23T11:19:18Z
thanks a lot.... i got it all sorted out. example below for controlling state of a job on a remote server


Invoke-Command -ComputerName VisualCronServerNam -ScriptBlock { & 'C:\Program Files (x86)\VisualCron\VCCommand\VCCommand.exe' --action deactivatejob --connectionmode remote --ip 10.10.10.10 --username admin --password SuperSecretPassword --name "Name of Job Here"}

Support
2019-04-23T12:28:07Z
Originally Posted by: GeoffAlbin 

thanks a lot.... i got it all sorted out. example below for controlling state of a job on a remote server


Invoke-Command -ComputerName VisualCronServerNam -ScriptBlock { & 'C:\Program Files (x86)\VisualCron\VCCommand\VCCommand.exe' --action deactivatejob --connectionmode remote --ip 10.10.10.10 --username admin --password SuperSecretPassword --name "Name of Job Here"}



Thanks, I see this as a workaround though, invoking the executable instead of using the API directly. This works but may give more overhead and less flexibility.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top