Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.1] - 2026-09-17

### Fixed
- **Literal path handling for JSON inputs and diagram output.** `Import-Inventory`,
SNMP credential-map readers, `Compare-NetworkScans` metadata inputs, and
Expand All @@ -16,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`Export-Topology`, `Export-Mermaid`, `Export-NodeInventoryCsv`, and
`Export-NetBox` now write with `Out-File -LiteralPath` (CSV row export
already used `-LiteralPath`).
- **Wizard output paths.** `examples/New-NetworkDiagram.ps1` uses
`-LiteralPath` when writing the diagram inventory and checking the draw.io
output file.

## [1.4.0] - 2026-09-09

Expand Down Expand Up @@ -262,6 +267,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.0.0]: https://github.com/jacobyoby/PSNetMap/releases/tag/v1.0.0
[1.1.0]: https://github.com/jacobyoby/PSNetMap/compare/v1.0.0...v1.1.0
[1.2.0]: https://github.com/jacobyoby/PSNetMap/compare/v1.1.0...v1.2.0
[unreleased]: https://github.com/jacobyoby/PSNetMap/compare/v1.4.0...HEAD
[unreleased]: https://github.com/jacobyoby/PSNetMap/compare/v1.4.1...HEAD
[1.4.1]: https://github.com/jacobyoby/PSNetMap/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/jacobyoby/PSNetMap/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/jacobyoby/PSNetMap/compare/v1.2.0...v1.3.0
4 changes: 2 additions & 2 deletions NetDiagram-PS/NetDiagram-PS.psd1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
RootModule = 'NetDiagram-PS.psm1'
ModuleVersion = '1.4.0'
ModuleVersion = '1.4.1'
GUID = 'a8f7e9c4-6d2b-4a1c-9e3f-7b8c9d0e1f2a'
Author = 'Jacob Yoby'
CompanyName = 'NetDiagram-PS'
Expand Down Expand Up @@ -49,7 +49,7 @@
Tags = @('Network', 'Discovery', 'Diagram', 'SNMP', 'DrawIO', 'Topology', 'NetworkMapping', 'Cisco', 'LLDP', 'IPv6', 'NetBox', 'Visualization')
LicenseUri = 'https://github.com/jacobyoby/PSNetMap/blob/main/LICENSE'
ProjectUri = 'https://github.com/jacobyoby/PSNetMap'
ReleaseNotes = '1.4.0. Module split into Public/Private loader files. Dual-stack inventory, IPv6 subnet matching/ARP/DrawIO parenting, bounded IPv6 discovery (ND plus /120+ CIDR; no /64 sweep), and Import-NmapScan IPv6 hosts (IPv4 preferred on dual-stack). Get-SnmpBridgeNeighbors emits L2-FDB edges (solid teal). Invoke-SnmpWalk and SNMP credential maps accept IPv6. Export-NetBox writes IPv6 to primary_ip6 and leaves unknown reachability empty. New commands: Invoke-NetworkDiscovery, Import-NmapScan, Export-Mermaid, Export-NetBox, Export-NodeInventoryCsv, Export-Topology, Import-Topology. Reachability is tri-state with optional TCP fallback. Packaged CI smoke imports FunctionsToExport and runs offline dual-stack DrawIO via Import-Inventory.'
ReleaseNotes = '1.4.1. Literal-path fixes for inventory/SNMP inputs, all exporters, Compare-NetworkScans, and the New-NetworkDiagram wizard (paths with [] work). 1.4.0. Module split into Public/Private loader files. Dual-stack inventory, IPv6 subnet matching/ARP/DrawIO parenting, bounded IPv6 discovery (ND plus /120+ CIDR; no /64 sweep), and Import-NmapScan IPv6 hosts (IPv4 preferred on dual-stack). Get-SnmpBridgeNeighbors emits L2-FDB edges (solid teal). Invoke-SnmpWalk and SNMP credential maps accept IPv6. Export-NetBox writes IPv6 to primary_ip6 and leaves unknown reachability empty. New commands: Invoke-NetworkDiscovery, Import-NmapScan, Export-Mermaid, Export-NetBox, Export-NodeInventoryCsv, Export-Topology, Import-Topology. Reachability is tri-state with optional TCP fallback. Packaged CI smoke imports FunctionsToExport and runs offline dual-stack DrawIO via Import-Inventory.'
}
}
}
2 changes: 1 addition & 1 deletion NetDiagram-PS/NetDiagram-PS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

# Module-level variables
$script:ModuleVersion = '1.4.0'
$script:ModuleVersion = '1.4.1'

# Dot-source private helpers first (so public functions can call them),
# then public commands.
Expand Down
8 changes: 4 additions & 4 deletions examples/New-NetworkDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ if ($MyInvocation.InvocationName -eq '.') { return }

# Import the module
$modulePath = Join-Path $PSScriptRoot '..' 'NetDiagram-PS' 'NetDiagram-PS.psd1'
if (-not (Test-Path $modulePath)) {
if (-not (Test-Path -LiteralPath $modulePath)) {
Write-Host "✗ Module not found at: $modulePath" -ForegroundColor Red
Write-Host " Please run this script from the examples/ folder or ensure NetDiagram-PS module is installed." -ForegroundColor Yellow
exit 1
Expand Down Expand Up @@ -1290,16 +1290,16 @@ Write-Host "`n[5/5] Generating your network diagram..." -ForegroundColor Yellow
$inventoryPath = Get-InventoryOutputPath -DiagramPath $OutputPath
$topology | Export-DrawIO -OutFile $OutputPath -Force

if (Test-Path $OutputPath) {
$fileSize = (Get-Item $OutputPath).Length
if (Test-Path -LiteralPath $OutputPath) {
$fileSize = (Get-Item -LiteralPath $OutputPath).Length
Write-Host " ✓ Created: $OutputPath ($fileSize bytes)" -ForegroundColor Green
}

# Save inventory for future use. Every accepted diagram extension produces a
# distinct sibling inventory file (Import-Inventory dual-stack contract).
$inventoryData = New-WizardInventoryObject -Nodes $nodes -Subnets $subnets

$inventoryData | ConvertTo-Json -Depth 10 | Out-File -FilePath $inventoryPath -Encoding utf8 -Force
$inventoryData | ConvertTo-Json -Depth 10 | Out-File -LiteralPath $inventoryPath -Encoding utf8 -Force
Write-Host " ✓ Saved inventory: $inventoryPath" -ForegroundColor Green

# Summary
Expand Down
12 changes: 12 additions & 0 deletions tests/NetDiagram.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,18 @@ Describe 'Get-SnmpBridgeNeighbors (#39 regression)' {
'{}' | Out-File -FilePath $script:CredMapPath -Force
}

It 'Reads credential map paths that contain wildcard metacharacters literally' {
$credPath = Join-Path $TestDrive 'credmap-bridge[lab].json'
'{}' | Set-Content -LiteralPath $credPath
$topology = Import-Inventory -Path $script:TestInventoryPath
Mock Invoke-SnmpWalk { @() } -ModuleName 'NetDiagram-PS'

$null = $topology | Get-SnmpBridgeNeighbors -CredentialMapPath $credPath -TryPublic -WarningAction SilentlyContinue

# Three BRIDGE-MIB columns per eligible node (test inventory has 3 nodes).
Should -Invoke Invoke-SnmpWalk -ModuleName 'NetDiagram-PS' -Times 9 -Exactly
}

It 'Produces edges from BRIDGE-MIB snmpwalk text for learned MACs with ARP matches' {
# Simulated snmpwalk output for three BRIDGE-MIB columns:
# dot1dTpFdbAddress (1.3.6.1.2.1.17.4.3.1.1) — MAC as Hex-STRING
Expand Down