What is the Issue?
When you try to create task in task scheduler.Under Security option you unchecks the ‘Run only when user is logged on’ and select ‘do not store passwords’ checkbox on General Tab.
On create of task the error pops up saying-An error has occurred for the task TaskName. Error message: The following error was reported: A specified logon session does not exist. It may have already been terminated..
This error will not occur if the “Run only when user is logged on” Security option on the General tab is selected.
This error came up whether you logs on as a Local Administrator, Domain Administrator, or any other user that had rights to log on locally. When creating a new task, this error will only occur if the Security Policy –Network access: Do not allow storage of passwords and credentials for network authentication is enabled and you select the “Run whether user is logged on or not” Security option on the General tab.
To resolve this error you need to disable security policy-
Network access: Do not allow storage of passwords and credentials for network authentication
Follow the steps-
SECPOL.MSC => Security Settings => Local Policies => Security Options=>Network access: Do not allow storage of passwords and credentials for network authentication
Disable the policy-