schtasks change
Changes one or more of the following properties of a task: Windows commands reference
On Windows
Windows
Changes one or more of the following properties of a task: - The program that the task runs (/tr) - The user account under which the task runs (/ru) - The password for the user account (/rp) - Adds the interactive-only property to the task (/it)
schtasks /change /tn <Taskname> [/s <computer> [/u [<domain>\]<user> [/p <password>]]] [/ru <username>] [/rp <password>] [/tr <Taskrun>] [/st <Starttime>] [/ri <interval>] [/rl <level>] [{/et <Endtime> | /du <duration>} [/k]] [/sd <Startdate>] [/ed <Enddate>] [/{ENABLE | DISABLE}] [/it] [/z]
To change the program that the Virus Check task runs from VirusCheck.exe to VirusCheck2.exe, type
schtasks /change /tn Virus Check /tr C:\VirusCheck2.exeIdentify/tnIdentifies the task to be changed. Windows commands reference/trChanges the program that the task runs. Windows commands referenceTo change the password of the user account for the RemindMe task on the remote computer, Svr01, type
schtasks /change /tn RemindMe /s Svr01 /rp p@ssWord3Identify/tnIdentifies the task to be changed. Windows commands reference/sSpecifies the name or IP address of a remote computer (with or without backslashes). Windows commands reference/rpSpecifies a new password for the existing user account, or the user account specified by the /ru parameter. Windows commands referenceTo change the ChkNews task, which starts Notepad.exe every morning at 9:00 A.M., to start Internet Explorer instead, type
schtasks /change /tn ChkNews /tr c:\program files\Internet Explorer\iexplore.exe /ru DomainX\Admin01Identify/tnIdentifies the task to be changed. Windows commands reference/trChanges the program that the task runs. Windows commands reference/ruChanges the user name under which the scheduled task has to run. Windows commands referenceTo change the SecurityScript task so that it runs with permissions of the System account, type
schtasks /change /tn SecurityScript /ruIdentify/tnIdentifies the task to be changed. Windows commands reference/ruChanges the user name under which the scheduled task has to run. Windows commands referenceTo add the interactive-only property to MyApp, an existing task, type
schtasks /change /tn MyApp /itIdentify/tnIdentifies the task to be changed. Windows commands reference/itSpecifies to run the scheduled task only when the run as user (the user account under which the task runs) is logged on to the computer. Windows commands referenceShow 19 options
/tn <Taskname>Identifies the task to be changed. Enter the task name (Note: Task names that have a space in its name are required to be wrapped in double quotes)./s <computer>Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer./u [<domain>]Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s./p <password>Specifies the password of the user account specified in the /u parameter. If you use the /u parameter without the /p parameter or the password argument, schtasks will prompt you for a password. The /u and /p parameters are valid only when you use /s./ru <username>Changes the user name under which the scheduled task has to run. For the system account, valid values are *""*, *"NT AUTHORITY\SYSTEM"*, or *"SYSTEM"*./rp <password>Specifies a new password for the existing user account, or the user account specified by the /ru parameter. This parameter is ignored with used with the local System account./tr <Taskrun>Changes the program that the task runs. Enter the fully qualified path and file name of an executable file, script file, or batch file. If you don't add the path, schtasks assumes that the file is in the <systemroot>\System32 directory. The specified program replaces the original program run by the task./st <Starttime>Specifies the start time for the task, using the 24-hour time format, HH:mm. For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM./ri <interval>Specifies the repetition interval for the scheduled task, in minutes. Valid range is 1 - 599940 (599940 minutes = 9999 hours). If either the /et or /du parameters are specified, the default is 10 minutes./et <Endtime>Specifies the end time for the task, using the 24-hour time format, HH:mm. For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM./du <duration>A value that specifies the duration to run the task. The time format is HH:mm (24-hour time). For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM./kStops the program that the task runs at the time specified by /et or /du. Without /k, schtasks doesn't start the program again after it reaches the time specified by /et or /du nor does it stop the program if it's still running. This parameter is optional and valid only with a MINUTE or HOURLY schedule./sd <Startdate>Specifies the first date on which the task should be run. The date format is MM/DD/YYYY./ed <Enddate>Specifies the last date on which the task should be run. The format is MM/DD/YYYY./ENABLESpecifies to enable the scheduled task./DISABLESpecifies to disable the scheduled task./itSpecifies to run the scheduled task only when the run as user (the user account under which the task runs) is logged on to the computer. This parameter has no effect on tasks that run with system permissions or tasks that already have the interactive-only property set. You can't use a change command to remove the interactive-only property from a task. By default, run as user is the current user of the local computer when the task is scheduled or the account specified by the /u parameter, if one is used. However, if the command includes the /ru parameter, then the run as user is the account specified by the /ru parameter./zSpecifies to delete the task upon the completion of its schedule./?Displays help at the command prompt.