Modifying ProxyAddresses attribute for a user in Powershell

Getting the current ProxyAddresses attribute value for a user in Powershell :

Get-ADUser -Filter 'Name -like "*username*"' -Properties ProxyAddresses

 

Setting several values for ProxyAddresses attribute :

Set-ADUser -Identity username -add @{Proxyaddresses="SMTP:username@domain",

"smtp:alias1@domain","smtp:alias2@domain"}

 

 

Advertisements