Add SMTP-ProxyAddress to users in AD with PowerShell

Here is a quick way to add new SMTP/ProxyAddress for the users in Active Directory with use of PowerShell.

Create a csv file with two columns
samaccountname | emailaddress
john.doe                 |

First column has user samaccountname and second column make sure you use the format; “

Once you have the csv file ready you can run this PowerShell script to update all those users with new SMTP/ProxyAddress.

Import-module ActiveDirectory
Import-Csv .\SMTPLIST.csv | ForEach-Object
$username = $_.samaccountname
$userproxy = $_.emailaddress -split ';'
Set-ADUser -Identity $username -Add @{proxyAddresses= $userproxy}

All done!