Run scheduled task with other domain user

5,889

Since this question has a lot of hits from search engines I though it will useful to add another method that works well (mentioned in this reply to a similar question):

You can add the credentials to a user profile in Windows using the Credential Manager found in the Windows control panel.

  1. Login under the user that will be running a Scheduled Task
  2. Open Credential Manager
  3. Click "Add A Windows Credential"
  4. Populate the "internet or network address" field with the server name
  5. Populate the "User Name" (include domain where required, i.e. MyDomain\MyUser)
  6. Populate the "Password"
  7. Click OK

Your scheduled task will now automatically use the credentials saved in the Credential Manager for the specified host.

Note that if user password changes you would need to update that in the Credentials Manager.

And a picture that worth a thousand words: Windows Credential Manager in action

Share:
5,889

Related videos on Youtube

maurice
Author by

maurice

Updated on September 18, 2022

Comments

  • maurice
    maurice over 1 year

    I have a .bat that copies files from source to destination. The source is the local joined server, the destination is a non-joined computer on the network. I need to run this .bat with task scheduler. What user can have privileges on the destination folder? On task scheduler I can only set local or domain users. The syntax of the bat is like the following:

    robocopy "C:\temp\test.txt" "\\192.168.0.1\c$\temp"