# neodesk maintenance

Quelle: https://docs.neode.sk/de/command-line/reference/maintenance/
Zuletzt geändert: 2026-12-03

> 8 Befehle. Wartungsfenster, die die Alarme von Geräten zurückhalten, während an ihnen gearbeitet wird.

Wartungsfenster, die die Alarme von Geräten zurückhalten, während an ihnen gearbeitet wird.

Die Befehle stehen hier auf Englisch, so wie die Kommandozeile sie mit `neodesk maintenance --help` zeigt. Die Flags, die jeder Befehl kennt, stehen in der [Befehlsreferenz](https://docs.neode.sk/de/command-line/reference.md#flags-for-every-command).

## neodesk maintenance devices

List the devices a maintenance window holds now.

```text quoted
neodesk maintenance devices [flags]
```

| Flag | What it is |
|---|---|
| `--device DEVICE` | only this device |

Needs device.view; only reads. Calls `GET /api/maintenance/devices`.

## neodesk maintenance window

Show one maintenance window and the devices it holds now.

```text quoted
neodesk maintenance window <id> [flags]
```

| Argument | What it is |
|---|---|
| `<id>` | The window ID |

Needs device.view; only reads. Calls `GET /api/maintenance/windows/{id}`.

## neodesk maintenance window-create

Create a maintenance window. While it runs, no alert rule sends an alert for its devices; the alerts are written as held.

The devices are named as a fleet task's targets: device IDs, group names, org:&lt;id>, group:&lt;name>, tag:&lt;tag>, site:&lt;id>, or all for the whole server (needs server.config). --minutes starts the window now. A window that runs once takes starts_at and ends_at (RFC 3339 times with their offset); a repeating one takes schedule weekly with days, start_time and duration_minutes, or schedule cron with cron and duration_minutes. Wall clock times are read in the server's time zone unless time_zone is set. grace_minutes (15 unless set) is how long after the end a device may still be offline before it alerts. Give the request body with -f key=value (text), -F key=json (numbers, true or false, lists) or --data JSON (or --data @file.json). The answer to a wrong body names what is missing.

```text quoted
neodesk maintenance window-create --name NAME [flags]
```

| Flag | What it is |
|---|---|
| `--name NAME` | what the window is for (required) |
| `--scope SCOPE` | the devices, groups, organizations, tags or sites, separated by commas |
| `--minutes N` | start now and run this many minutes |
| `--note NOTE` | a note for the people who see the window |
| `--grace N` | the grace time in minutes |

Needs org.manage_devices; changes something: needs a token with read and write access. Calls `POST /api/maintenance/windows`.

```bash quoted
neodesk maintenance window-create --name "Patch night" --scope "group:Berlin office" --minutes 120
neodesk maintenance window-create --data '{"name":"Weekly updates","scope":"tag:servers","schedule":"weekly","days":["sat"],"start_time":"22:00","duration_minutes":480}'
```

## neodesk maintenance window-delete

Delete a maintenance window. The alerts it held stay, with its name.

```text quoted
neodesk maintenance window-delete <id> [flags]
```

| Argument | What it is |
|---|---|
| `<id>` | The window ID |

Needs org.manage_devices; changes something: needs a token with read and write access; deletes or ends something for good, so it asks first unless --yes is given. Calls `DELETE /api/maintenance/windows/{id}`.

## neodesk maintenance window-end

End the running maintenance window now. Its grace time follows.

```text quoted
neodesk maintenance window-end <id> [flags]
```

| Argument | What it is |
|---|---|
| `<id>` | The window ID |

Needs org.manage_devices; changes something: needs a token with read and write access. Calls `POST /api/maintenance/windows/{id}/end`.

## neodesk maintenance window-extend

Extend the running maintenance window.

```text quoted
neodesk maintenance window-extend <id> --minutes N [flags]
```

| Argument | What it is |
|---|---|
| `<id>` | The window ID |

| Flag | What it is |
|---|---|
| `--minutes N` | how many minutes longer it runs (required) |

Needs org.manage_devices; changes something: needs a token with read and write access. Calls `POST /api/maintenance/windows/{id}/extend`.

```bash quoted
neodesk maintenance window-extend mw_1a2b3c --minutes 30
```

## neodesk maintenance window-update

Change a maintenance window. Give the fields to change.

Give the request body with -f key=value (text), -F key=json (numbers, true or false, lists) or --data JSON (or --data @file.json). The answer to a wrong body names what is missing.

```text quoted
neodesk maintenance window-update <id> [flags]
```

| Argument | What it is |
|---|---|
| `<id>` | The window ID |

Needs org.manage_devices; changes something: needs a token with read and write access. Calls `PATCH /api/maintenance/windows/{id}`.

## neodesk maintenance windows

List the maintenance windows you see: running ones first, then upcoming, then past ones.

```text quoted
neodesk maintenance windows [flags]
```

| Flag | What it is |
|---|---|
| `--state STATE` | running, upcoming or over |

Needs device.view; only reads. Calls `GET /api/maintenance/windows`.

```bash quoted
neodesk maintenance windows --state running
```
