Issue replacing proxyaddresses

Currently having an issue when trying to replace proxyaddresses.

1st I get the proxys
$proxys = (get-aduser $username -properties proxyaddresses).proxyaddresses

Then I change the users proxyaddresses through ADUC

I then run the above command again and compare to $proxys to confirm changes have been made

set-aduser $user -replace @{proxyaddresses=$proxys}

This leaves me with no addresses in proxyaddresses. If I then run
get-aduser $username -Properties proxyaddresses | select proxyaddresses
the result is



This should be a relatively simple task yet I cannot seem to get it working.

Any ideas on where I’m going wrong ? Using PS3.0.

I can complete the task successfully with the Quest cmdlets but am trying to use the ActiveDirectory Module more and more and ween myself off Quest.

Thanks in advance

The above article is using -ADD, I am looking for -REPLACE

I wasn’t able to reproduce the behavior you’re describing. Set-ADUser with the syntax you posted worked fine every time I tried it. What are the values of your $user and $proxys variables right before you run the Set-ADUser command?