Issue replacing proxyaddresses

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 3 years, 8 months ago.

  • Author
    Posts
  • #9806
    Profile photo of ratty67
    ratty67
    Participant

    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

  • #9813
    Profile photo of Rob Simmers
    Rob Simmers
    Participant
  • #9817
    Profile photo of ratty67
    ratty67
    Participant

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

  • #9820
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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?

You must be logged in to reply to this topic.