Subject: Running Psexec with WIndows Task Scheduler
Posted: 16 December 2013 at 4:15pm
I have a strange issue with Task Scheduler on Server 2008 R2 that simply runs a vbs, passing it an OU and the path to a batch file. The vbs in turn uses psexec to send the batch file to the computer objects in the OU. The batch file is pretty simple, it just checks when the Windows 7 and Office 2010 KMS activation expires and pipes the output to a log file on a share using >>\\server\share\Logs\%COMPUTERNAME%.txt
The problem is I only end up with 30-40 %COMPUTERNAME%.txt files in the \Logs directory when Task Scheduler runs the task, there are 90 computer objects in this OU. To be clear this is not even a scheduled operation, I'm running the task manually at this point. If I run the same task using a windows shortcut, that is the path to the vbs with the OU and batch file arguments appended to the end of the target field, I get a %COMPUTERNAME%.txt file for all 90 computer objects in the OU.
Any ideas?
I can post the task parameters if you think that'll help.