Include parsed name alongside payroll number for not-found AD accounts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user