Windows 2008 Schtasks error: User credentials are not allowed on the local machine


Last week I attempted to add a scheduled task to my Windows 2008 server using schtasks.exe. The syntax I used was:

schtasks /create /S server /U DOMAIN\ACCOUNT /P password /SC daily /ST 15:00 /TN BkupIIS /TR c:\scripts\bkupiis.cmd

I received the following message from schtasks.exe:

User credentials are not allowed on the local machine

The task scheduler log file shows the following error:

Task Scheduler failed to start “\BkupIIS” task for user “DOMAIN\ACCOUNT”. Additional Data: Error Value: 2147750687.

The secret to successfully scheduling the task is to use /RU and /RP instead of /U and /P.

The syntax that should be used to create the scheduled task is:

schtasks /create /S server /RU DOMAIN\ACCOUNT /RP password /SC daily /ST 15:00 /TN BkupIIS /TR c:\scripts\bkupiis.cmd

Reference: http://brianagibson.blogspot.com/2008/08/hmc-45-domaincachetask-scheduled-task.html

3 Responses to “Windows 2008 Schtasks error: User credentials are not allowed on the local machine”

  1. 5 Star Registry cleaner Says:

    I found the blog on a newsgroup and read a few posts. Great resource. Bookmarked and looingk forward to reading more future posts :)

  2. Holland Says:

    nice! helped me :)

  3. dave.harris.net | Hyper-V VM Backup Script Batch File Says:

    [...] nice little guide can be found here) That will then run the VmBackup task every Monday morning at [...]


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

Follow

Get every new post delivered to your Inbox.

Join 32 other followers

%d bloggers like this: