From 7b1682642b5b7a9dfd560b993969404bfef7fbdb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Sep 2026 13:14:20 +0000 Subject: [PATCH] Release 26.9.1.2: OrgUnit column shows just the containing OU name The handout CSVs (reset run and export-only) wrote OrgUnit as the full DN remainder (OU=Grade-05,OU=Students,DC=...); now it is just the containing OU's name (Grade-05), easier to read on login slips. The on-screen grid keeps the full path so same-named OUs in different buildings stay distinguishable. ModuleVersion bumped and changelog folded for release. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01HrMgHM3Zvkztxtfg2j85fa --- CHANGELOG.md | 8 ++++++++ src/IDBridge/IDBridge.psd1 | 2 +- src/IDBridge/Public/Core/Reset-IDBridgeADPassword.ps1 | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 062581c..d1da8bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to IDBridge are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions use a calendar scheme `YY.M.D.build` (see [CONTRIBUTING.md](CONTRIBUTING.md#versioning--releases)). +## [26.9.1.2] - 2026-09-01 + +### Changed +- **`Reset-IDBridgeADPassword` CSVs: `OrgUnit` is now just the containing OU's name** + (e.g. `Grade-05`) instead of the full DN path — easier to read on handout slips. Applies + to both the reset run's handout CSV and the export-only CSV; the on-screen grid keeps + the full path so same-named OUs in different buildings stay distinguishable. + ## [26.9.1.1] - 2026-09-01 ### Added diff --git a/src/IDBridge/IDBridge.psd1 b/src/IDBridge/IDBridge.psd1 index 0436570..b8dc7c1 100644 --- a/src/IDBridge/IDBridge.psd1 +++ b/src/IDBridge/IDBridge.psd1 @@ -1,6 +1,6 @@ @{ RootModule = 'IDBridge.psm1' - ModuleVersion = '26.9.1.1' + ModuleVersion = '26.9.1.2' GUID = 'a0a0c664-888e-44e2-9c12-fc8647a520c0' Author = 'Sam Cattanach' CompanyName = 'SC Networks LLC' diff --git a/src/IDBridge/Public/Core/Reset-IDBridgeADPassword.ps1 b/src/IDBridge/Public/Core/Reset-IDBridgeADPassword.ps1 index 5552123..b212374 100644 --- a/src/IDBridge/Public/Core/Reset-IDBridgeADPassword.ps1 +++ b/src/IDBridge/Public/Core/Reset-IDBridgeADPassword.ps1 @@ -520,7 +520,7 @@ function Reset-IDBridgeADPassword { if ($chkExport.Checked -and $succeededItems.Count -gt 0) { try { $state.ExportPath = Join-Path $IDConfig.Paths.ExportsRoot ("ADPasswordReset_" + (Get-Date -Format "yyyy-MM-dd-HH.mm.ss") + ".csv") - $succeededItems | Select-Object SamAccountName, Passphrase, @{n = 'OrgUnit'; e = { $_.DistinguishedName -replace '^CN=(?:\\.|[^,\\])*,', '' }} | Export-Csv -Path $state.ExportPath -NoTypeInformation + $succeededItems | Select-Object SamAccountName, Passphrase, @{n = 'OrgUnit'; e = { [regex]::Match(($_.DistinguishedName -replace '^CN=(?:\\.|[^,\\])*,', ''), '^OU=((?:\\.|[^,\\])*)').Groups[1].Value -replace '\\(.)', '$1' }} | Export-Csv -Path $state.ExportPath -NoTypeInformation Write-Log -Message "Reset: Exported $($succeededItems.Count) passphrase(s) to $($state.ExportPath). Delete the file after handout." } catch { @@ -564,7 +564,7 @@ function Reset-IDBridgeADPassword { try { $state.ExportPath = Join-Path $IDConfig.Paths.ExportsRoot ("ADPasswordExport_" + (Get-Date -Format "yyyy-MM-dd-HH.mm.ss") + ".csv") - $resets | Select-Object SamAccountName, Passphrase, @{n = 'OrgUnit'; e = { $_.DistinguishedName -replace '^CN=(?:\\.|[^,\\])*,', '' }} | Export-Csv -Path $state.ExportPath -NoTypeInformation + $resets | Select-Object SamAccountName, Passphrase, @{n = 'OrgUnit'; e = { [regex]::Match(($_.DistinguishedName -replace '^CN=(?:\\.|[^,\\])*,', ''), '^OU=((?:\\.|[^,\\])*)').Groups[1].Value -replace '\\(.)', '$1' }} | Export-Csv -Path $state.ExportPath -NoTypeInformation } catch { Write-Log -Message ("Reset: Passphrase export failed: $($_.Exception.Message)") -Level Error