locked
Getting "Error: Login failure: unknown user name or bad password" when trying to create a scheduled task RRS feed

  • Question

  • I am trying to create a very basic scheduled task from a powershell script and am getting the message: "Error: Login failure: unknown user name or bad password"

    I only get this error on my Windows 2008r2 server and do not get the error on my Windows 2003 server.  The error occurs when I provide the /rp parameter for the password.  If I run the exact same command from a regular cmd.exe window, it works just fine.  It's just when running the command from the powershell window that I get this error.  I also tried to change an existing task's password via a powershell window and received the same error.  Creating and changing a task works as long as I don't use the /rp parameter.

    Any ideas on what I am doing wrong or what I can check?

    Friday, October 26, 2012 7:35 PM

Answers

  • your mention of the /rp parameter suggests that you are creating the scheduled task using schtasks.exe. Do you get that error when you try to create the task, or when the task tries to run? If the latter, examine the task on that particular system and on one where it worked, and see if there are any differences.

    Otherwise, post the actual command you are using.


    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

    • Marked as answer by Scavenger9 Monday, October 29, 2012 2:46 PM
    Friday, October 26, 2012 10:10 PM

All replies

  • your mention of the /rp parameter suggests that you are creating the scheduled task using schtasks.exe. Do you get that error when you try to create the task, or when the task tries to run? If the latter, examine the task on that particular system and on one where it worked, and see if there are any differences.

    Otherwise, post the actual command you are using.


    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

    • Marked as answer by Scavenger9 Monday, October 29, 2012 2:46 PM
    Friday, October 26, 2012 10:10 PM
  • Sorry, it looks like the password on this system had a $ in it and powershell was treating it as a variable. 

    Monday, October 29, 2012 2:48 PM