PowerNetbox v4.5.2.1
Released 2026-02-28 - View on GitHub
Bug Fix
IPAM Prefix scope support (#356)
Breaking change fix: Netbox 4.2+ replaced the site foreign key on ipam.Prefix with a generic scope foreign key. The -Site parameter on Prefix functions was silently ignored by the API, preventing site assignment.
What changed:
- New-NBIPAMPrefix, Set-NBIPAMPrefix, Get-NBIPAMPrefix: The -Site / -Site_Id parameters have been replaced by -Scope_Type and -Scope_Id
- -Scope_Type accepts: dcim.region, dcim.sitegroup, dcim.site, dcim.location
- Bulk pipeline mode: site property is automatically translated to scope_type/scope_id for backward compatibility
Migration: ```powershell
Before (broken on Netbox 4.2+)
New-NBIPAMPrefix -Prefix "10.0.0.0/24" -Site 5
After
New-NBIPAMPrefix -Prefix "10.0.0.0/24" -Scope_Type "dcim.site" -Scope_Id 5
Scoping to a location (new capability)
New-NBIPAMPrefix -Prefix "10.0.0.0/24" -Scope_Type "dcim.location" -Scope_Id 10 ```
Verified against: Netbox 4.3.7, 4.4.10, and 4.5.2
Thanks to @AlexHallberg for reporting this issue!
Full Changelog: https://github.com/ctrl-alt-automate/PowerNetbox/compare/v4.5.2.0...v4.5.2.1