Support Tip: The Remove-SCOMDisabledClassInstance cmdlet times out in OpsMgr 2012
Published Feb 15 2019 07:20 PM 1,189 Views
First published on TECHNET on Aug 13, 2013

~ R.B.Ganesh | Senior Support Escalation Engineer

In 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

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],
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:

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

Get the latest System Center news on Facebook and Twitter :

System Center All Up:
System Center – Configuration Manager Support Team blog:
System Center – Data Protection Manager Team blog:
System Center – Orchestrator Support Team blog:
System Center – Operations Manager Team blog:
System Center – Service Manager Team blog:
System Center – Virtual Machine Manager Team blog:

Windows Intune:
WSUS Support Team blog:
The AD RMS blog:

App-V Team blog:
MED-V Team blog:
Server App-V Team blog:

The Forefront Endpoint Protection blog :
The Forefront Identity Manager blog :
The Forefront TMG blog:
The Forefront UAG blog:

Version history
Last update:
‎Mar 11 2019 09:56 AM
Updated by: