Library / Networking

NETS-001 · Script

Network Device Reboot Scheduler

Reboots selected Cisco Meraki devices through the Meraki Dashboard API, on a schedule you set or only when a device stops answering.

Version 1.0.0Language PowerShellUpdated November 2026

What it does

Looks up each device serial in the Meraki Dashboard API, logs its name, model, network and LAN IP, and in Reboot mode asks the Dashboard to reboot it. Report mode (default) only reads device details and logs what it would reboot.

Scheduling: this script reboots at the moment it runs. To reboot at a set time, schedule it in your RMM, in Windows Task Scheduler, or with cron/systemd timers on Linux, for example every Sunday at 03:00, with -Mode Reboot.

Health condition: with -Condition UnreachableOnly, a device is only rebooted when its LAN IP (as reported by the Dashboard) does not answer ping from the machine running the script. Run it from a machine on the same network as the devices, and allow ICMP from that machine. The Dashboard itself must still be able to reach the device for the reboot to take effect.

Only the official Meraki Dashboard API v1 is used:

  • GET /devices/{serial}: read device details
  • POST /devices/{serial}/reboot: request a reboot

The API key is sent only in the Authorization header and is never written to the log or the report. Rate limits (HTTP 429) are honoured using Retry-After. Meraki documents a limit of one reboot request per device every 60 seconds.

Requirements

Windows PowerShell 5.1 or PowerShell 7 (Windows, Linux or macOS), HTTPS access to api.meraki.com, and a Meraki Dashboard API key.

How to run it

  • Run from: an admin workstation or scheduled task with the Microsoft modules installed and app sign-in configured
  • This is an admin script for your Networking tenant, not a per-device endpoint script
  • User interaction: none with app-only sign-in
  • Schedule: run on demand, or weekly for reports

Settings

NameWhat it doesOptionsDefault
ApiKeyMeraki Dashboard API key with write access to the organization that owns the devices. Required. Store it in your RMM as a secret or masked variable.required
SerialOne or more device serial numbers, for example Q2XX-AAAA-BBBB, Q2YY-CCCC-DDDD.(none)
ModeReport (default) = read device details and log what would be rebooted. Reboot = send the reboot request for each selected device.Report, RebootReport
ConditionAlways (default) = every listed device is selected. UnreachableOnly = only devices whose LAN IP does not answer ping are selected.Always, UnreachableOnlyAlways
PingCountNumber of pings per device for -Condition UnreachableOnly. A device counts as unreachable only when all of them fail. Default: 4.4
DelaySecondsSeconds to wait between reboot requests, so that a stack of switches or a set of access points does not restart all at once. Default: 5.5
ApiBaseUrlDashboard API base URL. Default: https://api.meraki.com/api/v1 Change it only if your organization is hosted on a different Meraki region URL.https://api.meraki.com/api/v1
ReportDirFolder for the CSV report. Leave empty for the default: C:\ProgramData\Runbookia\Reports on Windows, /var/lib/runbookia/reports elsewhere.

Exit codes

  • 0 = Report complete with every device found, or every selected reboot accepted
  • 1 = Attention needed: a device was not found, is unreachable (Report mode),
  • or a reboot request failed
  • 2 = Script error (bad parameters, API key rejected, no network)

Testing steps

  1. Run it first with the mode set to Report on one test account or small group. Nothing is changed in that mode.
  2. Read the log and confirm the planned changes are what you expect.
  3. Run your chosen settings on the same test target and confirm the result.
  4. Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
  5. Roll out to a small group next, then everyone.

Rollback steps

Report mode changes nothing. A reboot cannot be undone, but it does not change device configuration; the device comes back with its saved Dashboard settings after a few minutes. To stop future reboots, disable or remove the schedule in your RMM or Task Scheduler.

Version and change log

VersionDateChanges
1.0.0November 2026First release.