Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OK, I have a Windows 2008 Server scheduled task that runs on system startup. This works fine. But I want to move this task to another box (actually, I'm using Amazon and need this to work on other instances launched from this image but that's complexity not relevant to the problem).

So I export the task to XML, and try to import it using schtasks. But when I try to reimport it on the same box (just by changing the name), I get

C:\>schtasks /Create /XML "mytask.xml" /TN "My Task 2"

ERROR: No mapping between account names and security IDs was done.

I look, and I notice that in the Principals section it says


Which will make me sad when I try to move this task to another box. But if I edit that to just say "Administrator", when I import I get this error:

ERROR: Logon failure: unknown user name or bad password.

So I can't even reimport it on the same box, and can clearly see I'll have trouble importing it on another... Any hints? I want to alter the task so I can use it on other boxes to accomplish the same goal.


share|improve this question
so you've scheduled a task to run as administrator, why not local system? – tony roth Jul 1 '10 at 19:43
Slight confusion - are you trying to copy the task on the same instance, or copy it to import elsewhere? Also, when you say "just by changing the name" are you changing the filename of the XML? Also, just to confirm, it sounds like these are standalone, not part of a domain? – Kara Marfia Jul 1 '10 at 19:44
Kara - I am trying both. It won't reimport on the same box as is. I save the .xml, then schtasks create with it using a different task name ("My Task 2" instead of "My Task") and get that mapping error. Then, in addition with an eye to box portability, I change the username and try to import it and get that unknown user error. And by changing the name, no, I mean I am changing the user name within the XML from IP-xxx\Administrator to Administrator (I've also tried SYSTEM\Administrator). – Ernest Mueller Jul 1 '10 at 19:59
ok in order to make this transportable, where the scheduler asks for a username and pw just enter system for the username and no password. – tony roth Jul 1 '10 at 20:02
Ah, I see. And the XML that is generated changes to have userid SYSTEM and the auth line of password is gone. Looks like that works, thanks! (It imports now at least.) I'd mark your answer good but it's a comment not an answer :-( – Ernest Mueller Jul 1 '10 at 20:15
up vote 1 down vote accepted

ok in order to make this transportable, where the scheduler asks for a username and pw just enter system for the username and no password.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.