[windows2000] Re: Pushing a scheduled job to all computers on a domain

  • From: "Sorin Srbu" <sorin.srbu@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 22 Mar 2007 15:31:45 +0100

Sorin Srbu <> wrote on Thursday, March 22, 2007 1:40 PM:

Tried this on a win2k-machine, and indeed, the script seems to be running, but
nothing happens, until you end the task in the task scheduler. It's a minor
bummer though, unless you have many 2k-machines in your domain/group.



> Sullivan, Glenn <> wrote on Thursday, March 22, 2007 1:06 PM:
> 
> Now that you mention it, I never tried it on win2k... I'll have to do that.
> 
> We don't have that many machines running that OS anyway, so it might not be
> a problem for that long - the hardware is rather old as well... I have good
> expectations that the computers running win2k will all die during this
> summer in the electrical storms, what with all the power-spikes, heat and
> what not. 8-]
> 
> 
>> Ah... I could have done that.
>> 
>> I was really looking for something for Win2K, not XP.  Win2K has no
>> command line defragger, and the network-wide versions are too much money.
>> 
>> 
>> Glenn Sullivan, MCSE+I MCDBA
>> David Clark Company Inc.
>> -----Original Message-----
>> From: windows2000-bounce@xxxxxxxxxxxxx
>> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu
>> Posted At: Thursday, March 22, 2007 3:46 AM
>> Posted To: Windows 2000
>> Conversation: [windows2000] Re: Pushing a scheduled job to all computers
>> on a domain Subject: [windows2000] Re: Pushing a scheduled job to all
>> computers on a domain 
>> 
>> 
>> Sullivan, Glenn <> wrote on Wednesday, March 21, 2007 12:25 PM:
>> 
>> See below:
>> 
>> Defrag_all.vbs
>> ---
>> 'defrag_all.vbs - Defrags all hard disks - Can be run as a Scheduled Task
>> 'C Doug Knox - 3/29/2002 
>> 
>> Set WshShell = WScript.CreateObject("WScript.Shell")
>> 
>>    Dim fso, d, dc
>>    Set fso = CreateObject("Scripting.FileSystemObject")    Set dc =
>>    fso.Drives For Each d in dc
>>       If d.DriveType = 2 Then
>>      Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)       End If
>>    Next
>> 
>> Set WshShell = Nothing
>> ---
>> 
>> From <<<http://www.dougknox.com/xp/xp_fixes.html>>>
>> 
>> 
>> I use psexec to run a daily inventory, but lately it hasn't run, says
>> there are no admin shares or some such. It worked before... Go figure. 8-/
>> 
>> Thx for the clarification on "for ... in"! I googled for it yesterday
>> but the examples weren't that informative and in most cases ambivalent as
>> to what goes where. 
>> 
>> 
>> 
>>> For %f in (filename.txt) do echo %f
>>> 
>>> This will echo every line in the text file, so replace the "Echo %f"
>>> with a remote AT command, or use PSExec to remotely run AT on that
>>> machine. 
>>> 
>>> Me, I'd use VBScript to do it if possible in a startup script.  Some
>>> samples are in the repository:
>>> http://www.microsoft.com/technet/scriptcenter/scripts/os/tasks/default .m
>>> spx 
>>> 
>>> I'd be interested in the Defrag script though... Can you save it as a txt
>>> file and post it? 
>>> 
>>> Glenn Sullivan, MCSE+I MCDBA
>>> David Clark Company Inc.
>>> -----Original Message-----
>>> From: windows2000-bounce@xxxxxxxxxxxxx
>>> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu
>>> Posted At: Wednesday, March 21, 2007 5:23 AM Posted To: Windows 2000
>>> Conversation: [windows2000] Re: Pushing a scheduled job to all computers
>>> on a domain Subject: [windows2000] Re: Pushing a scheduled job to all
>>> computers on
>> 
>>> a domain
>>> 
>>> 
>>> Dave stevens <> wrote on Wednesday, March 21, 2007 10:07 AM:
>>> 
>>> Yupp, seems like the at command will do the thing. I don't however
>>> understand how to tell it to use the computernames I have in the txt-file.
>>> 
>>> Some kind of loop like "run this command on the computers in the list"
>>> would be suitable. I recall some "for in %%..." something or other
>>> command in batch scripting, but can never remember how to...
>>> 
>>> 
>>> 
>>>> Yes, This can be done with the AT command. I believe the AT coomand
>>>> allows you to schedual jobs on a remote computer. You might need to
>>>> direct this to a text file with all the host names. Do a help on AT
>>>> it will offer you options. Hope this helps.
>>>> 
>>>> 
>>>> Dave
>>>> 
>>>> Sorin Srbu <sorin.srbu@xxxxxxxxxxxxx> wrote:
>>>> 
>>>>    Hi all,
>>>> 
>>>>    I found a vb-script that runs from the CLI and that defags all
>>>>    harddrives it finds on a system. The auhor mentions that it's easy to
>>> schedule
>>> using
>>>>    the task scheduler. This would most probably work for us if I set the
>>>>    script to execute as System or some other privilegied account, so
>>>> that
>>> the
>>>>    normal user (who isn't allowed to run a defrag) can have a
>>> defragged
>>> gd on
>>>>    a regular basis.
>>>> 
>>>>    I'm able to push the script to all clients, but is there a way
>>> to add
>>> a
>>>>    task to all client computers from one location (like my admin
>>>>    workstation)? I'm not really sure how one would do this. Can you ppl
>>>> suggest a simple way? 
>>>> 
>>>>    TIA.
>>>> 
>>>> 
>>>>    BW,
>>>> 
>>>>    Sorin
>>>> 
>>>>    # Sorin Srbu, Systems Engineer Web: http://www.orgfarm.uu.se
>>>>    # Dept of Medicinal Chemistry, Phone: +46 (0)18-4714482 >3
>>> signals>
>>> GSM
>>>>    # Div of Org Pharm Chem, Mobile: +46 (0)701-718023
>>>>    # Box 574, Uppsala University, Fax: +46 (0)18-4714482
>>>>    # SE-751 23 Uppsala, Sweden Visit: BMC, Husargatan 3, D5:512b #
>>>>    # () ASCII ribbon campaign - Against html E-mail
>>>>    # /\
>>>>    #
>>>>    # Harmless tagline follows:
>>>>    #
>>>>    # Some things Man was never meant to know. For everything else,
there's
>>>> Google. 
>>>> 
>>>>    *****************************
>>>>    New Site from The Kenzig Group!
>>>>    Windows Vista Links, list options
>>>>    and info are available at:
>>>>    http://www.VistaPop.com
>>>>    *****************************
>>>>    To Unsubscribe, set digest or vacation
>>>>    mode or view archives use the below link.
>>>> 
>>>>    http://thethin.net/win2000list.cfm
>>>> 
>>>> 
>>>> 
>>>> ________________________________
>>>> 
>>>> Sucker-punch spam
>>>> 
>>> <http://us.rd.yahoo.com/evt=49981/*http://advision.webevents.yahoo.com /m
>>> ailbet a/features_spam.html>
>>>> with award-winning protection.
>>>> Try the free Yahoo! Mail Beta.
>>>> 
>>> <http://us.rd.yahoo.com/evt=49981/*http://advision.webevents.yahoo.com /m
>>> ailbet a/features_spam.html>
>>> 
>>> *****************************
>>> New Site from The Kenzig Group!
>>> Windows Vista Links, list options
>>> and info are available at:
>>> http://www.VistaPop.com
>>> *****************************
>>> To Unsubscribe, set digest or vacation mode or view archives use the
>>> below link. 
>>> 
>>> http://thethin.net/win2000list.cfm
>>> *****************************
>>> New Site from The Kenzig Group!
>>> Windows Vista Links, list options
>>> and info are available at:
>>> http://www.VistaPop.com
>>> *****************************
>>> To Unsubscribe, set digest or vacation mode or view archives use the
>>> below link. 
>>> 
>>> http://thethin.net/win2000list.cfm
>> 
>> *****************************
>> New Site from The Kenzig Group!
>> Windows Vista Links, list options
>> and info are available at:
>> http://www.VistaPop.com
>> *****************************
>> To Unsubscribe, set digest or vacation
>> mode or view archives use the below link.
>> 
>> http://thethin.net/win2000list.cfm
>> *****************************
>> New Site from The Kenzig Group!
>> Windows Vista Links, list options
>> and info are available at:
>> http://www.VistaPop.com
>> *****************************
>> To Unsubscribe, set digest or vacation
>> mode or view archives use the below link.
>> 
>> http://thethin.net/win2000list.cfm
> 
> *****************************
> New Site from The Kenzig Group!
> Windows Vista Links, list options
> and info are available at:
> http://www.VistaPop.com
> *****************************
> To Unsubscribe, set digest or vacation
> mode or view archives use the below link.
> 
> http://thethin.net/win2000list.cfm

*****************************
New Site from The Kenzig Group!
Windows Vista Links, list options 
and info are available at:
http://www.VistaPop.com
***************************** 
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: