In System Center 2012 Operations Manager, running the
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)
+ 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],
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
cmdlet, it contains additional information on how
works as well: