Include parsed name alongside payroll number for not-found AD accounts
This commit is contained in:
1 parent
8aa4c8b3bd
commit
2fb501c91e
1 file changed
+4
-1
+4
-1
@@ -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