Include parsed name alongside payroll number for not-found AD accounts

This commit is contained in:
2026-02-27 10:26:54 +11:00
parent 8aa4c8b3bd
commit 2fb501c91e

View File

@@ -66,7 +66,10 @@ foreach ($entry in $Deduped.Values) {
-ErrorAction Stop
} catch {
$notFound++
$notFoundList += $samAccount
$parsedName = if ($email -match "^([^.]+)\.([^@]+)@") {
"$($Matches[1]) $($Matches[2])"
} else { "Unknown" }
$notFoundList += "$samAccount, $parsedName"
continue
}