Task Scheduler – A Specified Logon Session Does Not Exist

The above error can appear when you try to create/modify a scheduled task to run as a specific user (schtasks /CHANGE /TN <task name> /RU <user> /RP <password>)

The cause of the error is a specific security policy on the machine.

It can be resolved via either the Local Group Policy Editor, or the Registry Editor (which is handy if you want to script it).

Local Group Policy Editor

set the following value to ‘Disabled‘ in the local group policy editor:

Security Settings | Local Policies | Security Options | Network access: Do not allow storage of passwords and credentials for network authentication 

You don’t need to reboot/relogin – simpy run the command to create/update the task.

You can change the value back to ‘Enabled‘ immediately after, and again, no need to reboot/relogin.

Registry Editor

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa

VALUE: disabledomaincreds

SETTING: 0 – disabled, 1 – enabled

Here, as well, no need to relogin or reboot in order for the change to take effect.

 

 

Advertisements

2 thoughts on “Task Scheduler – A Specified Logon Session Does Not Exist

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s