# Build a reviewable onboarding plan from synthetic input. Does not create accounts. [CmdletBinding()] param([string]$InputPath = (Join-Path $PSScriptRoot '../data/sample-users.csv')) $ErrorActionPreference = 'Stop' $seen = @{} $departments = @('Admin','Staff','Students') foreach ($user in (Import-Csv -LiteralPath $InputPath)) { $account = ([string]$user.Account).Trim().ToLowerInvariant() if ($account -notmatch '^[a-z][a-z0-9.-]{2,19}$') { throw "Invalid sample account: $account" } if ($seen.ContainsKey($account)) { throw "Duplicate account: $account" } if ($departments -notcontains $user.Department) { throw "Unknown department: $($user.Department)" } if ([string]::IsNullOrWhiteSpace($user.DisplayName)) { throw 'DisplayName is required.' } $seen[$account] = $true [pscustomobject]@{ Account = $account DisplayName = $user.DisplayName UserPrincipalName = "$account@lab.example" Department = $user.Department TargetOU = "OU=$($user.Department),OU=Lab,DC=lab,DC=example" Action = 'Review only - no account created' } }