Start-SCOMMaintenanceMode
Updated: September 10, 2012
Applies To: System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager
Start-SCOMMaintenanceMode
Syntax
Parameter Set: FromInstance Start-SCOMMaintenanceMode [-Instance] <MonitoringObject[]> [-EndTime] <DateTime> [[-Comment] <String> ] [[-Reason] <MaintenanceModeReason> ] [-PassThru] [ <CommonParameters>]
Detailed Description
The Start-MaintenanceMode cmdlet places a specified class instance into maintenance mode, and creates new active maintenance mode entries.
When in maintenance mode, alerts, notifications, rules, monitors, automatic responses, state changes, and new alerts are suppressed for the class instance.
Parameters
-Comment<String>
Allows you to type a comment about the maintenance activity.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
3 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-EndTime<DateTime>
Specifies the time that the maintenance will end. The minimum amount of time a resource can be in maintenance mode is 5 minutes.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
2 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Instance<MonitoringObject[]>
Specifies a class instance object. Enter a variable that represents the class instance, or type a command that gets the class instance. This parameter also accepts group objects.
For information about how to get a class instance object, type Get-Help Get-SCOMClassInstance.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-PassThru
|
Aliases |
none |
|
Required? |
false |
|
Position? |
named |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-Reason<MaintenanceModeReason>
Specifies the reason for placing the resource into maintenance mode. Valid values are: PlannedOther, UnplannedOther, PlannedHardwareMaintenance, UnplannedHardwareMaintenance, PlannedHardwareInstallation, UnplannedHardwareInstallation, PlannedOperatingSystemReconfiguration, UnplannedOperatingSystemReconfiguration, PlannedApplicationMaintenance, ApplicationInstallation, ApplicationUnresponsive, ApplicationUnstable, SecurityIssue, LossOfNetworkConnectivity.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
4 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
The first command gets the class instance named Server01.Contoso.com.
The second command gets the current time and adds ten minutes.
The third command starts maintenance on the object stored in the $Instance variable, sets the end time for the time stored in the $Time variable, and specifies a reason and a comment about the maintenance mode activity.
PS C:\>$Instance = Get-SCOMClassInstance -Name Server01.Contoso.comPS C:\>$Time = ((Get-Date).AddMinutes(10))PS C:\>Start-SCOMMaintenanceMode -Instance $Instance -EndTime $Time -Reason "SecurityIssue" -Comment "Applying software update."
