Skip to main content

Windows Scheduled task Management pack

While Implementing monitoring for Schedule tasks with SCOM 2012 , we utilized a community management pack

http://rburri.wordpress.com/2008/02/14/windows-scheduled-tasks-management-pack-for-opsmgr-2007/


After we imported the MP , we started receiving a lot of alerts related to some tasks which no one knew about .

It was a schedule task related to User profile manager software that we had tested.

We wanted to delete this schedule task on all the machines that raised the alert

In order to find the machines , we used the following SQL query against Opsmgr db


SELECT  MonitoringObjectPath,MonitoringObjectName, AlertStringName, AlertStringDescription, MonitoringRuleId, Name
FROM Alertview WITH (NOLOCK)
WHERE TimeRaised is not NULL
AND AlertStringName like 'Scheduled Task failed to complete successfully'
And MonitoringObjectName like '\updater.exe'


Then i created a batch file with the following content schtasks /delete /F /TN "updater.exe"

where updater.exe was the name of the Task

We used psexec to execute the command remotely on all 75 machines.

First we saved psexec and a text file that has the list of all machine names

then we executed the command as

psexec.exe -u domain\username -p password @pc.txt \\fileserver\DeleteTask.cmd


weher pc.txt is the file which contains the name of all the computers that had the alert

deletetask.cmd is the file which does the following:

schtasks /delete /F /TN "updater.exe"



Hope this helps

Comments

Popular posts from this blog

Group Policy Object did not apply because it failed with error code '0x80070534 No mapping between account names and security IDs was done

One of our servers was losing the Local Admin settings as we control them using GPO (restricted Groups) We were receiving the following event on this particular server : Event ID 4098 Application Event Log The computer 'Administrators (built-in)' preference item in the 'Servers Local Admins {odjd9DBD-22AF-48EA-ADF5-F42ADE4182hst}' Group Policy Object did not apply because it failed with error code '0x80070534 No mapping between account names and security IDs was done.' This error was suppressed. To fix the issue we deleted all the folders from the following location and rebooted the server C:\ProgramData\Microsoft\Group Policy\History Hope this helps.

iDRAC 7 Shows no Signal in Virtual Console Preview

Recently i logged on to iDRAC for one of our Dell R720 servers,however somehow the console redirection did not work at all. I kept on seeing No Signal on the Virtual console Preview. I tried Rebooting the server but that did not help. Finally i clicked on Reset iDRAC and this did the trick. It may take around 2 -5 minutes before you can access iDRAC page again. I had to power on the server through iDRAC before anything showed up on console. Hope this Helps.

Close Open Files in Isilon

To close Open files in Isilon Sometimes we may have to Close open files on Isilon , This is how we can accomplish it First find all the Open Files using the Following Command: isi_for_array  "isi smb openfiles list" To Narrow the search  we can grep the result  as an example isi_for_array  "isi smb openfiles list" | grep -i abc Once you find the files the 6 digit number is the id for that open file. To close the open file run the following command isi_for_array isi smb openfiles close "123456" -f Hope this helps