Re: Scheduled Defrag Script
- From: "Leuchtflux" <ephemeral.strobe@xxxxxxxxx>
- Date: 27 Dec 2006 10:17:08 -0800
We have set defrag to run on clients on even Fridays in the month. We
created two rules with Desktop Authority
(http://www.scriptlogic.com/da) that starts 'defrag' on user desktops
by shutdown event each 2nd and 4th Friday. Shutdown is implemented via
inactivity monitoring which autoshutdowns client computer when it
founds users to be inactive for a predefined period at the end of the
workday.
Josip wrote:
I am wondering how I can get this script:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("Notepad.exe", "********123000.000000-420", _
True , 1 OR 4 OR 16, , , JobID)
Wscript.Echo errJobCreated
To run defrag every 2 Weeks, on Sunday at 2:00am.
I'm not sure how to change the times, or days, or anything like that, any
help would be appreciated.
Thanks!
.
- Prev by Date: Re: Adding Missing printer if they not there
- Next by Date: Re: Disable Local Computer Account
- Previous by thread: Re: VB script that deletes files from a folder based on certain dates
- Next by thread: Re: Disable Local Computer Account
- Index(es):
Relevant Pages
|