Export (0) Print
Expand All
Expand Minimize

Set-MaintenanceWindow

Set-MaintenanceWindow

Sets properties of a maintenance window.

Syntax

Parameter Set: FromMonitoringObjectProviderPath
Set-MaintenanceWindow [-EndTime] <DateTime> [[-Reason] <Nullable`1> ] [[-Comment] <String> ] [[-Path] <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromMonitoringObject
Set-MaintenanceWindow [-EndTime] <DateTime> [[-Reason] <Nullable`1> ] [[-Comment] <String> ] [-MonitoringObject] <MonitoringObject> [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

Sets properties of a maintenance window. It can be used to update end time, reason and comments on the current maintenance mode for the monitoring object specified by the MonitoringObject or Path parameters.

Parameters

-Comment<String>

Specifies comments about the maintenance.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-EndTime<DateTime>

Specifies the UTC time the maintenance will end. NOTE: This value is assumed to be UTC time. If the Kind property of the supplied DateTime value is set to "Local", this value will be converted to UTC time automatically.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-MonitoringObject<MonitoringObject>

Specifies the monitoring object on which to set maintenance window properties.


Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Path<String[]>

Specifies the path or paths to monitoring objects on which to set maintenance window properties. To enter multiple path, separate them by using commas.


Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Reason<Nullable`1>

Specifies the reason for the maintenance.The following lists the acceptable values for this parameter:


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Notes

  • If either the Reason parameter or the Comments parameter are not specified then only the EndTime is updated.
    For more information, type "Get-Help Set-MaintenanceWindow -detailed". For technical information, type "Get-Help Set-MaintenanceWindow -full".
    When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

Examples

-------------- EXAMPLE 1 --------------

This command updates all the maintenance windows on all agent-managed computers by adding the comment "extended one day" and setting the end time of the maintenance to November 18, 2007.


C:\PS>set-maintenancewindow -path Microsoft.SystemCenter.AllComputersGroup `-comment "extended one day" -endtime "November 18, 2007"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft