Re: Exporting / Altering scheduled tasks
From: Dave Patrick (mail_at_NoSpam.DSPatrick.com)
Date: 06/08/04
- Next message: gavin: "RE: CPU 100%"
- Previous message: Torgeir Bakken \(MVP\): "Re: Installer seems corrupted"
- In reply to: Benny: "Exporting / Altering scheduled tasks"
- Next in thread: Benny: "Re: Exporting / Altering scheduled tasks"
- Reply: Benny: "Re: Exporting / Altering scheduled tasks"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 16:36:26 -0600
One idea might be to run from the command line;
schtasks /query >D:\dave.txt
then import the text file into excel and loop through the 'TaskName' column
and run against each of the tasks
schtasks /change /ru <newuser> /rp <newpassword> /tn <taskname>
D:\>schtasks /change /?
SCHTASKS /Change [/S system [/U username [/P password]]] {[/RU runasuser]
[/RP runaspassword] [/TR taskrun]} /TN taskname
Description:
Changes the program to run, or user account and password used by a
scheduled task.
Parameter List:
/S system Specifies the remote system to connect to.
/U username Specifies the user context under which the
command should execute.
/P password Specifies the password for the given user
context.
/RU username Changes the user name (user context) 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
context or the password for a new user account. Password will not effect for
the system account.
/TR taskrun Specifies a new program that the scheduled
task runs. Type the path and file name of the program.
/TN taskname Specifies which scheduled task to change.
/? Displays this help/usage.
Examples:
SCHTASKS /Change /RP password /TN "Backup and Restore"
SCHTASKS /Change /TR restore.exe /TN "Start Restore"
SCHTASKS /Change /S system /U user /P password /RU newuser
/TN "Start Backup"
-- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "Benny" wrote: | Hi All | | I have a client who has about 2000 jobs running nightly reports in Schedules | Tasks on Win2000 Pro. He needs to move them to his new win2003 server. But | when he moves them (via copy/paste) each job need various things amending | before it will run. ie, user/password credentials, file paths, etc | Obviously he does not want to have to edit each of the 2000 jobs, so does | any one know if there is a tool out there to automate changes to multiple | schedule tasks like this? Or alternatively does any one know of any 3rd | party scheduling tools that may be easier to do these sort of things ? | | Any suggestions much appreciated. | | Ben | |
- Next message: gavin: "RE: CPU 100%"
- Previous message: Torgeir Bakken \(MVP\): "Re: Installer seems corrupted"
- In reply to: Benny: "Exporting / Altering scheduled tasks"
- Next in thread: Benny: "Re: Exporting / Altering scheduled tasks"
- Reply: Benny: "Re: Exporting / Altering scheduled tasks"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|