Skip to content

run

ndcli run is the user-initiated command surface for the NetDefense fleet. It issues a pre-defined operation to one device, a group of devices (an OU), or every device in your organization — optionally scheduled for a later time.

Under the hood, each invocation creates one task per resolved device. To inspect or cancel those tasks afterwards, use ndcli task.

CommandDescription
run pingPing a target IP or hostname from the device(s)
run poweroffPower off the device(s)
run restartRestart (reboot) the device(s)
run plugin-install(Re)install the NetDefense agent plugin on the device
run plugin-reloadReload (restart) the NetDefense agent service

Every ndcli run subcommand accepts the same target and scheduling flags. At least one targeting flag is required.

FlagRepeatableDescription
--device <name>YesTarget a specific device by name
--ou <name>YesTarget every enabled device in the OU
--orgNo (boolean)Target every enabled device in the current organization

--org is mutually exclusive with --device and --ou. Otherwise, --device and --ou may be combined freely — the final target set is the union of all resolved devices, deduped by UUID.

If any named device or OU cannot be resolved, the whole batch is rejected with a 422 error — no partial application.

The --at flag defers execution. Omit it to run immediately. Three input forms are accepted:

FormExampleMeaning
Relative offset--at 30m, --at 2h, --at 3d, --at 1wNow + offset. Units: s, m, h, d, w.
Bare timestamp--at 2026-05-12
--at "2026-05-12 03:00"
--at 2026-05-12T03:00:00
Interpreted in your configured timezone (see config set timezone). Date-only inputs land at midnight.
Explicit timezone--at 2026-05-12T03:00:00Z
--at 2026-05-12T03:00:00-03:00
RFC3339 — exact instant, no ambiguity.

Bare timestamps follow your output.timezone config (default: system local). So if you ndcli config set timezone America/Sao_Paulo, then --at "2026-05-12 03:00" means 3 AM in São Paulo. The CLI converts to UTC before sending to the server.

Scheduled tasks are created with status SCHEDULED. NetDefense activates them (flips to PENDING) every 10 seconds when their time arrives, then dispatches normally. You can ndcli task cancel <code> a scheduled task at any time before it’s activated.


Ping a target IP or hostname from the device(s).

Terminal window
ndcli run ping --host <target> [--count <n>] <target-flags> [--at <time>]
FlagRequiredDefaultDescription
--hostYesTarget IP or hostname to ping
--countNo4Number of ping packets (1–1000)
Terminal window
# Single device
ndcli run ping --host 8.8.8.8 --device fw-prod-01
# Whole OU
ndcli run ping --host 1.1.1.1 --count 10 --ou edge-routers
# Schedule for 3 AM UTC
ndcli run ping --host 8.8.8.8 --device fw-prod-01 --at 2026-05-12T03:00:00Z

Power off the device(s). The device goes offline immediately and must be powered back on physically (or via out-of-band management).

Terminal window
ndcli run poweroff <target-flags> [--at <time>]
Terminal window
# Single device, immediate
ndcli run poweroff --device decommissioned-fw
# Maintenance-window shutdown for a whole OU at 3 AM UTC
ndcli run poweroff --ou datacenter-east --at 2026-05-12T03:00:00Z

Restart (reboot) the device(s). Brings the device through a full reboot cycle; service is interrupted until it comes back online.

Terminal window
ndcli run restart <target-flags> [--at <time>]
Terminal window
ndcli run restart --device fw-staging-01
ndcli run restart --ou edge-routers --at 2026-05-12T03:00:00Z

(Re)install the NetDefense agent plugin on one or more devices. The task completes when the agent reconnects with the expected version, or fails on mismatch / 15-minute timeout.

Terminal window
ndcli run plugin-install [--version <semver>] <target-flags> [--at <time>]
FlagDefaultDescription
--version(latest)Semver to pin the install to. Empty = upgrade to the latest in the device’s installed channel.
Terminal window
# Upgrade everything in the org to latest
ndcli run plugin-install --org
# Pin a specific version on a subset of devices
ndcli run plugin-install --version 1.5.2 --ou edge-routers --device fw-spare-01

Reload (restart) the NetDefense agent service on the device(s). The device stays online; only the agent process restarts.

Terminal window
ndcli run plugin-reload <target-flags> [--at <time>]
Terminal window
ndcli run plugin-reload --device fw-prod-01
# Whole org, scheduled for the maintenance window
ndcli run plugin-reload --org --at 2026-05-12T03:00:00Z