Friday, November 2, 2007

Opening up Scheduled Tasks for remote servers from the command line

Imagine you have Scheduled Tasks on many servers. While it is easy enough to open a Window in Windows Explorer and type something like file:////myserver/Scheduled to open the Scheduled Tasks window for a specified server, this does not work if you type this into the command prompt or in a batch file. What I found is that you can open a shortcut from the command line though. So, open the Scheduled Tasks as described above, and then drag the icon in the left part of the address bar to your desktop (or other directory). This will create a shortcut. You can then type this into a command line or batch file and the Scheduled Tasks Window will open for the specified server. This is not a huge time saver, but it is convenient to have a list of icons to click instead of trying to remember all the servers, type them in, etc. If you have lots of servers that need to be updated it can be very slow waiting for the Scheduled Tasks windows to appear. I recommend putting them in a batch file with the name of the shortcut (you will need to enclose in double quotes if the name has spaces in it) on each line. Here is an example of a batch file that opens 3 servers one after another. "Scheduled Tasks on server1.lnk" "Scheduled Tasks on server2.lnk" "Scheduled Tasks on server3.lnk" Now when you need to update the scheduled tasks all you do is run this batch file, take a few minute break, come back and you will have all your Scheduled Tasks windows open and ready for editing. This beats doing it one at a time if you ask me. :) TIP: You really only need to create one shortcut. Then make a copy of it, and open it in notepad. It is fairly cryptic looking. Just look for the server name and change it to the server you want it to point to. Save the text file. That is it. No you have a shortcut that works, and you didn't have to wait to connect to Scheduled Tasks to create it.

No comments: