|
Hmm. You might want to trap for errors after each operation
to see where its failing. It could be a timing issue, I suppose, but that
shouldn't matter for querying WMI. Assuming your scripts are running
asynchronously (the default) maybe try putting a sleep into the script at the
beginning to see if it is a timing issue where the user environment is not
available when the script is running.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harding, Devon Sent: Monday, January 09, 2006 9:08 AM To: [email protected] Subject: RE: [ActiveDir] Schedueled Tasks script in GPO The script works with
the non-privileged user logged in. Just not through the
GPO. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Darren
Mar-Elia Does the user
running the job have the privileges to create and modify AT
jobs? From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of When I run this script manually, it
works and deletes system created At jobs. But when I place this in a
logon script in GPO, it doesn’t run. Any reason
why? On Error Resume
Next strComputer =
"." Set objWMIService =
GetObject("winmgmts:" _ &
"{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2") Set colScheduledTasks =
objWMIService.ExecQuery _ ("Select * from
Win32_ScheduledJob") For Each objTask in
colScheduledTasks intJobID =
objTask.JobID Set objInstance =
objWMIService.Get _
("Win32_ScheduledJob.JobID=" & intJobID)
objInstance.Delete Next Windows
Systems Engineer Southern Wine
& Spirits - BSG 954-602-2469 __________________________________ |
- RE: [ActiveDir] Schedueled Tasks script in GPO Darren Mar-Elia
- Re: [ActiveDir] Schedueled Tasks script in GPO Za Vue
- RE: [ActiveDir] Schedueled Tasks script in GPO Harding, Devon
- RE: [ActiveDir] Schedueled Tasks script in GPO Darren Mar-Elia
- RE: [ActiveDir] Schedueled Tasks script in GPO Harding, Devon
- RE: [ActiveDir] Schedueled Tasks script in GPO Harding, Devon
- RE: [ActiveDir] Schedueled Tasks script in GPO Darren Mar-Elia
