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.

DSS WSUS server fail to download Updates HTTP status 404: The requested URL does not exist on the server.

When managing a Downstream WSUS server , it may happen that when a patch is approved it tried to immediately download it form the source server (USS) Sometime we see errors in event viewer stating that the the download failed Event ID: 364 Content file download failed. Reason: HTTP status 404: The requested URL does not exist on the server. Source File: /Content/6E/72131F469F73C884B32124746BAFCA2C8E0A106E.cab Destination File: E:\WSUS\WsusContent\6E\72131F469F73C884B32124746BAFCA2C8E0A106E.cab Event ID 10032 The server is failing to download some updates. We also see following entries in softwaredistribution.log 2016-09-26 07:53:29.287 UTC Warning WsusService.3 ContentSyncAgent.ProcessBITSNotificationQueue ContentSyncAgent recieved Failure for Item: f52f0b8a-2b22-43cf-933e-af8de6b11eb6, Item fails 2016-09-26 07:53:29.287 UTC Info WsusService.3 ContentSyncAgent.ContentSyncSPFireStateMachineEvent ContentSyncAgent firing Event: FileDownloadFailed for Item: f5...

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.