5
I have a scheduled task that triggers every hour. It runs as a service, meaning it's marked with "Run whether user is logged on or not". Because of my company's security policy I have to change my windows password every once in a while.
The problem is that after I change my windows password the scheduled task stops working. To make it work again I have to do the following: Go into Task Scheduler (Taskschd.msc) locate the task and go into properties, click OK. This causes a prompt window to appear that asks me for my new windows password.
Many times after changing my windows password, I forget to go into the scheduled task properties and update the password there. This causes the task not to work for a while, a situation which I usually notice when it's too late. I have to rely on the task to be triggered every hour, even after I change windows password (without having to remember to update task properties).
Is there a way to avoid having to go through the procedure of updating the password in the scheduled task properties after every time I change my windows password?
Works. Thanks! However, I have a powershell script that creates the scheduled-task (which I distribute to all members of my team):
Register-ScheduledJob –FilePath C:\scripts\send_mail.ps1 –Trigger (New-JobTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 60) -RepetitionDuration ([TimeSpan]::MaxValue)) -Name send_mail
Do you know if it's possible to alter this script so that it creates the task under the SYSTEM account? – Doron Gold – 2015-07-19T14:05:51.207My powershell is not that advanced, but it definitely should be possible. – LPChip – 2015-07-19T14:20:21.560