locked
Change task scheduler credentials schtasks.exe /change RRS feed

  • Question

  • HI all,

    we are currently doing an (User) AD migration whereby the Schedule task needs to be updated. For this task we have developed some scripts but .. somethimes the task won't update the (new) credentials. 

    For example a server got 10 tasks, when changing credentials on these tasks, 9 task are updating their credentials with SUCCESS and one is failing. When doing this manually (in GUI) there is no issue. It seems this is going randomly or the problem is at the specific task it self.

    Any suggestions ?

    extra info:

    old run as user is migrated to the new domain and enabled. This run as user is doing verry well with other tasks. Windows Server 2008 is used in the domain


    • Edited by Mecka233 Wednesday, October 15, 2014 12:16 PM
    Wednesday, October 15, 2014 12:16 PM

Answers

All replies

  • SCHTASKS is not a script it is a system utility.  Post in the platform forum for your OS for assistance.

    ¯\_(ツ)_/¯

    Wednesday, October 15, 2014 1:09 PM
  • Please read the following article:

    Windows IT Pro: Updating a Scheduled Task's Credentials

    The article has a download for a script called Set-ScheduledTaskCredential.ps1 that overcomes this limitation.


    -- Bill Stewart [Bill_Stewart]

    • Proposed as answer by Bill_Stewart Wednesday, November 5, 2014 4:57 PM
    • Marked as answer by Bill_Stewart Thursday, November 20, 2014 5:33 PM
    Wednesday, October 15, 2014 2:19 PM