Für einen definierten Server kann man den Maintenance-Mode Report aus dem DataWarehouse anzeigen, mittels Powershell-Skript oder SQL.
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%‘
Powershell-Skript:
$servername = „SCOM24301P.KP24.DE“
$mc = get-monitoringClass -name Microsoft.Windows.Computer
$mo = get-monitoringObject -monitoringClass $mc | where {$_.name -eq ‚$servername‘}
$mo | get-maintenanceWindow -history
Output:
MonitoringObjectId : drv23dgwu-w3r4-b3c4-d3h6-wh2h45g7ibje
StartTime : 10.09 2012 07:28:55
ScheduledEndTime : 10.09.2012 08:28:55
EndTime : 10.09.2012 08:30:11
Reason : PlannedApplicationMaintenance
Comments : Patch and Update
User : KP24\ua301
LastModified : 10.09.2012 08:30:11
ManagementGroup : KP24_SCOM_PROD
ManagementGroupId : drv23dgwu-w3r4-b3c4-d3h6-wh2h45g7ibje