Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use DescribeMaintenanceWindows with a CLI

Focus mode
Use DescribeMaintenanceWindows with a CLI - AWS Systems Manager

The following code examples show how to use DescribeMaintenanceWindows.

CLI
AWS CLI

Example 1: To list all maintenance windows

The following describe-maintenance-windows example lists all maintenance windows in your AWS account in the current Region.

aws ssm describe-maintenance-windows

Output:

{ "WindowIdentities": [ { "WindowId": "mw-0ecb1226ddEXAMPLE", "Name": "MyMaintenanceWindow-1", "Enabled": true, "Duration": 2, "Cutoff": 1, "Schedule": "rate(180 minutes)", "NextExecutionTime": "2020-02-12T23:19:20.596Z" }, { "WindowId": "mw-03eb9db428EXAMPLE", "Name": "MyMaintenanceWindow-2", "Enabled": true, "Duration": 3, "Cutoff": 1, "Schedule": "rate(7 days)", "NextExecutionTime": "2020-02-17T23:22:00.956Z" }, ] }

Example 2: To list all enabled maintenance windows

The following describe-maintenance-windows example lists all enabled maintenance windows.

aws ssm describe-maintenance-windows \ --filters "Key=Enabled,Values=true"

Example 3: To list maintenance windows matching a specific name

This describe-maintenance-windows example lists all maintenance windows with the specified name.

aws ssm describe-maintenance-windows \ --filters "Key=Name,Values=MyMaintenanceWindow"

For more information, see View Information About Maintenance Windows (AWS CLI) in the AWS Systems Manager User Guide.

PowerShell
Tools for PowerShell

Example 1: This example lists all maintenance windows on your account.

Get-SSMMaintenanceWindowList

Output:

Cutoff : 1 Duration : 4 Enabled : True Name : My-First-Maintenance-Window WindowId : mw-06d59c1a07c022145
AWS CLI

Example 1: To list all maintenance windows

The following describe-maintenance-windows example lists all maintenance windows in your AWS account in the current Region.

aws ssm describe-maintenance-windows

Output:

{ "WindowIdentities": [ { "WindowId": "mw-0ecb1226ddEXAMPLE", "Name": "MyMaintenanceWindow-1", "Enabled": true, "Duration": 2, "Cutoff": 1, "Schedule": "rate(180 minutes)", "NextExecutionTime": "2020-02-12T23:19:20.596Z" }, { "WindowId": "mw-03eb9db428EXAMPLE", "Name": "MyMaintenanceWindow-2", "Enabled": true, "Duration": 3, "Cutoff": 1, "Schedule": "rate(7 days)", "NextExecutionTime": "2020-02-17T23:22:00.956Z" }, ] }

Example 2: To list all enabled maintenance windows

The following describe-maintenance-windows example lists all enabled maintenance windows.

aws ssm describe-maintenance-windows \ --filters "Key=Enabled,Values=true"

Example 3: To list maintenance windows matching a specific name

This describe-maintenance-windows example lists all maintenance windows with the specified name.

aws ssm describe-maintenance-windows \ --filters "Key=Name,Values=MyMaintenanceWindow"

For more information, see View Information About Maintenance Windows (AWS CLI) in the AWS Systems Manager User Guide.

For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.