i try to update the zip-code for active directory users as the below
# Import AD Module
Import-Module ActiveDirectory
$users = Import-Csv -Path C:\zip.csv
# Loop through CSV and update users if the exist in CVS file
foreach ($user in $users) {
Get-ADUser -Filter "SamAccountName -eq '$($user.Username)'"
Set-ADUser -PostalCode $($user.zipcode)
}
Ahmed Zidan Network Administrator