Bulk Update Contact Information like Department field for all users from Powershell
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned
PS C:\WINDOWS\system32> Connect-ExchangeOnline
PS C:\WINDOWS\system32> $user_file = Import-CSV C:\Users\naufil.mirsinge\Downloads\Import_Contact_Sample.csv
PS C:\WINDOWS\system32> $user_file | ForEach-Object { Set-user -identity $_.Userprincipalname -department $_.department}
WARNING: The command completed successfully
Format of CSV file as below
UserPrincipalName | Department |
naufil.mirsinge@netcorecloud.com | Mail Support |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article