Windows - Change password in a scheduled task

To change a password in a scheduled task in Windows, define this template in a child credential, so after the parent credential is changed, the password in scheduled task will be changed too.

Create a new template, in the menu Executions > Settings > Templates :

Name: Windows Scheduled Task

Executor: Windows RM

Execution Type: Password change

Content:

powershell Set-ScheduledTask -TaskName “[ADD_INFO#]” -User “[#USERNAME#]” -Password (ConvertTo-SecureString -String “[#NEW_PASSWORD#]” -AsPlainText -Force)