# Issue replacing proxyaddresses

**URL:** <https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838>\
**Category:** PowerShell Help\
**Created:** [August 28, 2013, 7:21am UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838 "2013-08-28T07:21:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratty67](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@ratty67](https://forums.powershell.org/u/ratty67)\
**Post date:** [August 28, 2013, 7:21am UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838/1 "2013-08-28T07:21:32Z")

</div>

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

Then  
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

## proxyaddresses

{}

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

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [August 28, 2013, 8:26am UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838/2 "2013-08-28T08:26:46Z")

</div>

[http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/21/weekend-scripter-create-proxyaddresses-in-active-directory-with-powershell.aspx](http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/21/weekend-scripter-create-proxyaddresses-in-active-directory-with-powershell.aspx)

---

<div class="post-metadata">

**Author:** ![ratty67](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@ratty67](https://forums.powershell.org/u/ratty67)\
**Post date:** [August 28, 2013, 11:40am UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838/3 "2013-08-28T11:40:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [August 28, 2013, 2:28pm UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838/4 "2013-08-28T14:28:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/issue-replacing-proxyaddresses/1838/5 "2024-05-16T20:57:06Z")

</div>

Closed on May 16, 2024, 8:57pm UTC


