Get-MaintenanceWindow
Get-MaintenanceWindow
Syntax
Parameter Set: FromMonitoringObjectProviderPath Get-MaintenanceWindow [[-History]] [[-Path] <String[]> ] [ <CommonParameters>] Parameter Set: FromMonitoringObject Get-MaintenanceWindow [-MonitoringObject] <MonitoringObject> [[-History]] [ <CommonParameters>]
Detailed Description
Gets maintenance window information for a monitoring object that is currently in maintenance mode. The cmdlet can retrieve maintenance windows for top-level items, items at the current location or for specified monitoring objects.
Parameters
-History
Determines whether to retrieve the history of the maintenance window.
Aliases | none |
Required? | false |
Position? | 2 |
Default Value | none |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
-MonitoringObject<MonitoringObject>
Specifies the monitoring object. If you use this parameter, only the maintenance window for the specified object is retrieved.
Aliases | none |
Required? | true |
Position? | 1 |
Default Value | none |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
-Path<String[]>
Specifies the path or paths to monitoring objects for which to retrieve maintenance windows. To enter more than one path, separate them by using commas.
Aliases | none |
Required? | false |
Position? | 3 |
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
Notes
-
For more information, type "Get-Help Get-MaintenanceWindow -detailed". For technical information, type "Get-Help Get-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 retrieves all maintenance windows that have a Reason setting of UnplannedOther.
C:\PS>get-maintenancewindow | where-object {$_.Reason -eq "UnplannedOther"}
