We help IT Professionals succeed at work.

need assistance with a powershell script for adding additional email alias

hello, can someone help me modify the following script to work on a non-exchange server. [we are in dirsync mode with office 365 and have removed Exchange on-premise.
I need to modify this to key on the proxyAddresses attribute rather than emailAddresses so I can run this on a domain controller [not an exchange server]

Import-Csv alias-add-pipe.csv | % {
$user = Get-user $_.SMTP 
$user.emailAddresses += $_.newsmtp
Set-Mailbox $user -emailAddresses $user.emailAddresses

Open in new window

Watch Question

Senior Solution Architect
Most Valuable Expert 2015
Top Expert 2015


can someone assist me with modifying the code I submitted to meet these requirements.

thx in advance.