PowerNetbox v4.5.7.0
Released 2026-04-10 - View on GitHub
PowerNetbox v4.5.7.0
Compatibility update for Netbox 4.5.7, plus a new branching cmdlet, three correctness fixes, and a new tooling script that makes ValidateSet drift catchable in CI.
What's new
Netbox 4.5.7 compatibility (#388)
CI matrix bumped to v4.5.7-4.0.2, module version 4.5.7.0. Netbox 4.5.7 is a maintenance release with no new API schema values, no removed fields, and no breaking changes — see the Netbox release notes. The module works unchanged against Netbox 4.3.7, 4.4.10, and 4.5.7.
Verified live against zulu-how.exe.xyz (upgraded from 4.5.6 to 4.5.7 via the project's Ansible playbook) plus the full Docker integration matrix on push.
New: Wait-NBBranch cmdlet (#383, #386)
New cmdlet that blocks until a branch reaches a target status. Solves the race where New-NBBranch | Enter-NBBranch fails because the branched schema isn't yet provisioned and the API returns the cryptic HttpResponseBadRequest object has no attribute schema_name error.
```powershell
Provision a branch and immediately enter its context
New-NBBranch -Name 'feature/new-datacenter' | Wait-NBBranch | Enter-NBBranch
Wait through a sync
Sync-NBBranch -Id 42 -Confirm:`$false Wait-NBBranch -Id 42 -TimeoutSeconds 300
Wait for a merge
Merge-NBBranch -Id 42 -Confirm:`$false Wait-NBBranch -Id 42 -TargetStatus merged ```
Handles every status in the netbox-branching plugin's lifecycle (new, provisioning, syncing, migrating, merging, reverting are transitional; ready, merged, archived are valid targets; failed throws with branch.errors attached). Fails fast when the branch reaches an unexpected terminal state instead of burning the timeout.
Bug fixes
Cable_Profile ValidateSet broken since v4.5.0 (#389, #390)
All 24 values in New/Set/Get-NBDCIMCable -Cable_Profile were stripped of their single- / trunk- / breakout- prefixes, so every call sent an invalid API request that the Netbox API silently rejected. The ValidateSet now contains the 25 correct CableProfileChoices values, including the new breakout-1c2p-2c1p added in Netbox 4.5.7 (netbox-community/netbox#21760).
Breaking change: users who were calling -Cable_Profile 1c1p (or any other old value) must switch to the prefixed form (single-1c1p). Since the old values were rejected by Netbox anyway, any caller that currently appears to "work" was either never using this parameter or was constructing raw request bodies.
Get-NBBranch -Status ValidateSet incorrect (#385, #387)
The ValidateSet accepted a non-existent conflict value and rejected 9 of the 11 real BranchStatusChoices. Replaced with all 11 plugin values (new, provisioning, ready, syncing, migrating, merging, reverting, merged, archived, pending-migrations, failed).
401/403 errors now surface branch context (#382, #384)
When a write inside an Enter-NBBranch context fails with 401 Unauthorized or 403 Forbidden, the error message now includes the active branch name + schema_id and branching-specific troubleshooting hints (verify branch write permissions, check if the branch is merged or archived, try Exit-NBBranch to isolate). No change when no branch is active.
New tooling: Verify-ValidateSetParity.ps1 (#391, #393)
New script in scripts/ that detects drift between PowerNetbox's [ValidateSet(...)] decorators and Netbox's choices.py source files. Catches the class of bug we've now fixed four times (#360, #369, #385, #389) before it ships.
```powershell
Quick check against the latest Netbox release
./scripts/Verify-ValidateSetParity.ps1
Check against a pinned version
./scripts/Verify-ValidateSetParity.ps1 -NetboxVersion v4.5.7
CI gate
./scripts/Verify-ValidateSetParity.ps1 -FailOnMismatch ```
The initial run against Netbox 4.5.7 found 20 drift issues — tracked in #392 for follow-up PRs.
Test coverage
- 2400+ unit tests pass across Linux, macOS, and Windows on PowerShell 5.1 and 7.x
- All 94 integration tests pass against Netbox 4.3.7, 4.4.10, and 4.5.7 in Docker
- Branching plugin integration tests pass against Netbox 4.5.6 with the netbox-branching plugin
- PSScriptAnalyzer clean on all changed files
Upgrade
powershell
Update-Module PowerNetbox -Force
Or fresh install:
powershell
Install-Module PowerNetbox -Scope CurrentUser