Compartilhar via


PartialMonitoringObject.ScheduleMaintenanceMode Method (DateTime, DateTime, MaintenanceModeReason, String, TraversalDepth)

 

Applies To: Operations Manager for System Center 2012

Schedules maintenance mode for this object.

Namespace:   Microsoft.EnterpriseManagement.Monitoring
Assembly:  Microsoft.EnterpriseManagement.OperationsManager (in Microsoft.EnterpriseManagement.OperationsManager.dll)

Syntax

public void ScheduleMaintenanceMode(
    DateTime startTime,
    DateTime scheduledEndTime,
    MaintenanceModeReason reason,
    string comments,
    TraversalDepth traversalDepth
)
public:
void ScheduleMaintenanceMode(
    DateTime startTime,
    DateTime scheduledEndTime,
    MaintenanceModeReason reason,
    String^ comments,
    TraversalDepth traversalDepth
)
member ScheduleMaintenanceMode : 
        startTime:DateTime *
        scheduledEndTime:DateTime *
        reason:MaintenanceModeReason *
        comments:string *
        traversalDepth:TraversalDepth -> unit
Public Sub ScheduleMaintenanceMode (
    startTime As Date,
    scheduledEndTime As Date,
    reason As MaintenanceModeReason,
    comments As String,
    traversalDepth As TraversalDepth
)

Parameters

  • startTime
    Type: System.DateTime

    The time, in DateTime, to start maintenance mode

  • scheduledEndTime
    Type: System.DateTime

    The scheduled time, inDateTime format, to end maintenance mode.

  • comments
    Type: System.String

    Comments about starting maintenance mode.

  • traversalDepth
    Type: Microsoft.EnterpriseManagement.Common.TraversalDepth

    A value that specifies the scope of the returned results. A value of OneLevel includes only instances of the specified class in the scope of the returned results. A value of Recursive includes instances of the specified class and all instances that are contained by those instances.

Remarks

When a monitoring object is in maintenance mode, the following features are temporarily suspended.

  • Rules and monitors

  • Notifications

  • Diagnostics and recoveries

  • State changes

  • New alerts

When maintenance mode starts or stops, by reaching the startTime or scheduledEndTime time, the MaintenanceModeLastModified property is reset

See Also

UpdateMaintenanceMode
ScheduleMaintenanceMode Overload
PartialMonitoringObject Class
Microsoft.EnterpriseManagement.Monitoring Namespace

Return to top