~ R.B.Ganesh | Senior Support Escalation Engineer

rbganeshIn System Center 2012 Operations Manager, running the Remove-SCOMDisabledClassInstance cmdlet may time out with the following message:

Started.  This operation may take a very long time to complete.
Remove-SCOMDisabledClassInstance : The requested operation timed out.
At line:1 char:33
+ Remove-SCOMDisabledClassInstance <<<<
+ CategoryInfo          : NotSpecified: (Microsoft.Syste...nstancesCommand:RemoveSCDisabledClassInstancesCommand)
[Remove-SCOMDisabledClassInstance], TimeoutException
+ FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.RemoveSCDisabledClas
sInstancesCommand

This can occur with Management groups that have a large number of DiscoverySources that have an override for the Enabled property.

The default timeout value for this cmdlet is 30 minutes. The query below should provide information on the number of DiscoverySources that the cmdlet should parse through to remove the objects that are not monitored by the Management group.

SELECT Distinct [DiscoverySource].[DiscoverySourceId],
[DiscoverySource].[DiscoverySourceType],
[DiscoverySource].[DiscoveryRuleId],
[DiscoverySource].[BoundManagedEntityId]
FROM dbo.DiscoverySource
INNER JOIN dbo.ModuleOverride ON ModuleOverride.ParentId = DiscoverySource.DiscoveryRuleId
AND ModuleOverride.OverrideableParameterId = dbo.fn_MPObjectId(NULL, NULL, N'Enabled')
AND (ParentType = 'Discovery' OR ParentType = 'Rule')
WHERE DiscoverySource.IsDeleted = 0

If you run into the timeout issue while running the cmdlet, please check for the following:

1. The cmdlet needs to be run under the context of a user who is member of the Operations Manager Administrator group.

2. Performance of the SQL server hosting the OperationsManager database needs to be checked and confirmed that it is performing optimally.

3. The objects that you are trying to remove from the Management group are removed after each run of the cmdlet even if it times out. As an alternative, you can run in the cmdlet repeatedly until it completes successfully.

Although the following blog post talks about the Remove-DisabledMonitoringObject cmdlet, it contains additional information on how Remove-SCOMDisabledClassInstance works as well:

http://blogs.technet.com/b/jonathanalmquist/archive/2008/09/14/remove-disabledmonitoringobject.aspx

R.B.Ganesh | Senior Support Escalation Engineer | Microsoft GBS Management and Security Division

Get the latest System Center news on Facebook and Twitter:

clip_image001 clip_image002

System Center All Up: http://blogs.technet.com/b/systemcenter/
System Center – Configuration Manager Support Team blog: http://blogs.technet.com/configurationmgr/
System Center – Data Protection Manager Team blog: http://blogs.technet.com/dpm/
System Center – Orchestrator Support Team blog: http://blogs.technet.com/b/orchestrator/
System Center – Operations Manager Team blog: http://blogs.technet.com/momteam/
System Center – Service Manager Team blog: http://blogs.technet.com/b/servicemanager
System Center – Virtual Machine Manager Team blog: http://blogs.technet.com/scvmm

Windows Intune: http://blogs.technet.com/b/windowsintune/
WSUS Support Team blog: http://blogs.technet.com/sus/
The AD RMS blog: http://blogs.technet.com/b/rmssupp/

App-V Team blog: http://blogs.technet.com/appv/
MED-V Team blog: http://blogs.technet.com/medv/
Server App-V Team blog: http://blogs.technet.com/b/serverappv

The Forefront Endpoint Protection blog : http://blogs.technet.com/b/clientsecurity/
The Forefront Identity Manager blog : http://blogs.msdn.com/b/ms-identity-support/
The Forefront TMG blog: http://blogs.technet.com/b/isablog/
The Forefront UAG blog: http://blogs.technet.com/b/edgeaccessblog/