An error that does not stop the script and may allow later commands to continue running. PowerShell cmdlets often emit these when processing multiple objects and only some items fail. They can be useful for bulk work, but they also create risk if teams do not inspect results carefully.
Expanded Definition
A non-terminating error is a runtime error that reports a failure but lets the current script or pipeline continue executing subsequent commands. In PowerShell, this distinction matters because a command can partially succeed: one object may fail validation or lookup while the rest still process. That makes the term operationally important in bulk administration, where an incomplete failure can be easy to overlook.
In practice, the meaning is narrower than “the script handled it.” A non-terminating error still signals broken assumptions, missing objects, permissions problems, or malformed input. Teams that want reliable automation often combine error preferences, explicit checks, and logging so failures are visible instead of buried in output. The NIST NIST Cybersecurity Framework 2.0 is relevant here because detection and response depend on knowing when operational actions have failed, even if the workflow keeps moving.
The most common misapplication is treating a non-terminating error as a successful result, which occurs when operators read only the final exit path and ignore per-item failures.
Examples and Use Cases
Implementing error handling rigorously often introduces more scripting overhead, requiring organisations to weigh automation speed against the cost of verifying partial failures item by item.
- Bulk user or service-account updates where one identity cannot be resolved, but the rest of the batch still applies.
- Inventory scripts that query many systems and continue after one endpoint times out or returns a permission error.
- Secrets rotation jobs where most credentials are updated, but a subset fails and needs retry logic or escalation.
- Agent administration workflows that enumerate resources and continue even when one object is missing or locked.
For NHI operations, this is especially important during lifecycle tasks such as revocation or rotation. The NHI Lifecycle Management Guide and the Ultimate Guide to NHIs — Lifecycle Processes for Managing NHIs both reinforce why partial completion must be treated as a governance issue, not just a scripting detail.
Why It Matters in NHI Security
Non-terminating errors are dangerous in NHI workflows because they can hide failed deprovisioning, missed secret rotation, or incomplete privilege changes. In automation that manages service accounts, API keys, or certificates, one skipped object can leave standing access in place even when the job appears to have succeeded. That is how a routine administrative run becomes an exposure event.
NHIMG research shows that 91.6% of secrets remain valid five days after the targeted organisation is notified, showing how failure to complete remediation can persist long after the initial issue is known. That kind of delay often reflects weak handling of partial errors, not just slow response. The same risk appears in incident response, where operators may assume a cleanup job finished when a subset of actions silently failed.
In other words, this term becomes operationally unavoidable after a rotation, offboarding, or cleanup run leaves behind access that should have been removed. Organisations typically encounter the consequence only after a breach review or failed audit reveals that the “successful” job never fully completed.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 | Partial failures in NHI automation often expose weak secret handling and incomplete lifecycle actions. |
| NIST CSF 2.0 | DE.CM-1 | Non-terminating errors matter because monitoring must detect failed actions even when workflows continue. |
| NIST Zero Trust (SP 800-207) | AC-3 | Zero Trust depends on enforcing access decisions consistently, including when batch operations partially fail. |
Log and verify every per-object failure so NHI rotations and removals do not stop at a hidden error.