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
|
-ErrorAction Stop
|
||||||
} catch {
|
} catch {
|
||||||
$notFound++
|
$notFound++
|
||||||
$notFoundList += $samAccount
|
$parsedName = if ($email -match "^([^.]+)\.([^@]+)@") {
|
||||||
|
"$($Matches[1]) $($Matches[2])"
|
||||||
|
} else { "Unknown" }
|
||||||
|
$notFoundList += "$samAccount, $parsedName"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user