Hi all
Using the following I intend to populate the telephone number field in AD:
Import-Csv C:\test.csv | ForEach-Object {
Set-ADUser -Identity $_.samAccountName -OfficePhone $_.telephoneNumber -MobilePhone $_.MobilePhone
}
Odds are the HR system that dumped out the csv has some incorrect samaccountname's. Can you edit my code above to log the accounts not found to csv for me? Im not sure how to error log that.