简体   繁体   中英

Import XML in Windows Task Scheduler

I have created a task in Windows Task Scheduler which I would like to import into another machine. I am using the command below, but I am getting an error, wondering if someone could help, thanks.

schtasks.exe /create /tn MyTask /xml "C:\\tmp\\exported_task.xml" /f

ERROR: The user name or password is incorrect.

Got the answer, you need to specify the credentials under which account the task will be created for. The syntax should be similar to the below,

schtasks.exe /create /tn MyTask /xml "C:\\tmp\\exported_task.xml" /ru %COMPUTERNAME%\\my_user /rp my_pass

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM