Maintenance mode history/report for the defined server can be viewed by Powershell script or Sql query to OperationsManagerDW.
By SQL query:
USE OperationsManagerDW
SELECT ManagedEntity.DisplayName, MaintenanceModeHistory.*
FROM ManagedEntity WITH (NOLOCK)
INNER JOIN
MaintenanceMode ON ManagedEntity.ManagedEntityRowId = MaintenanceMode.ManagedEntityRowId
INNER JOIN
MaintenanceModeHistory ON MaintenanceMode.MaintenanceModeRowId = MaintenanceModeHistory.MaintenanceModeRowId
where DisplayName Like '%servername%'
By Powershell script:
$mc = get-monitoringClass -name Microsoft.Windows.Computer
$mo = get-monitoringObject -monitoringClass $mc | where {$_.name -eq 'servername'}
$mo | get-maintenanceWindow -history
Notice that Powershell script is rather slow in large environments.
MaintenanceMode ON ManagedEntity.ManagedEntityRowId = MaintenanceMode.ManagedEntityRowId cliquez ici
ReplyDelete