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

Citrix XenApp 6.5 Discovery fails Event 3989

Citrix XenApp 6.5 Service account password change caused console discovery to fail and we saw event ID 3989 in System Event logs "Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: 28000 -> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication." After changing the service account password needed to run the following command on the delivery controllers. DSMAINT CONFIG /user:abc\ABCSVCCitrix /pwd:nP@ssword /dsn:"C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn" Restart IMA service You should now be able to run the discovery successfully Hope this helps

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.

StoreFront 2.0 Propagate Changes Event ID 0 and 1 .There was no endpoint listening at net.tcp

When we add server to the Citrix storefront 2.0 server gropup , it may happen that the Propagate changes give us an error You will see the following events on the Primary StoreFront 2.0 Server Event Id 0: Error in retrieving synchronization information. Citrix.DeliveryServices.PowerShell.Command.Runner.Exceptions.PowerShellExecutionException: An error occured running the command: 'Get-DSClusterConfigurationUpdateState' ---> System.Management.Automation.ActionPreferenceStopException: Command execution stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: There was no endpoint listening at net.tcp://storefront02/Citrix/ConfigurationReplication that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Event Id 1: Citrix.DeliveryServices.PowerShell.Command.Runner.Exceptions.PowerShellExecutionException, Citrix.Delive...