I am trying find any typos in user zip code entries. We have a file with all zip codes that helpdesk use when creating users.
Using Get-ADUser -Filter * -Properties POBox | select POBox I am able to get all PObox entry for all users.
Next step is to check zip codes in the text file glocodes and if entry does not match it should output to console.
$GLCODES= Get-Content glcodes.txt
Get-ADUser -Filter * -Properties POBox |
select POBox |
? {$_.POBox -notcontains $GLCODES}
Please suggest.