none
Changing SIP Addresses for all AD Users RRS feed

  • Question

  • Need to change the SIP address for all AD users. Since proxyAddresses is a multi-valued attribute, it's a bit harder to maintain the current list of addresses in there and just remove and add one. This is what I have so far, but I need a way to delete only the SIP address and replace it with the new domain name.

    Import-Module ActiveDirectory
    $Users = get-aduser -properties * -filter {proxyAddresses -like "SIP:*@CompanyA.com"}
    Foreach($User in $Users){
    $NameCombo = ($User.GivenName)+"."+($User.Surname)
    Set-Aduser $User -Add @{proxyAddresses="SIP:"+$NameCombo+"@CompanyB.com"}}

    # NEED HELP REMOVING -->Set-Aduser $User -Remove @{proxyAddresses="SIP:"+"*@CompanyA.com"}}

    Thursday, September 1, 2016 9:33 PM

Answers

  • Hi Vegas,

    Please try this:

     -Remove @{Attribute1LDAPDisplayName=value[];   Attribute2LDAPDisplayName=value[]}

    You could also refer to below:

     help Set-ADUser -Parameter remove

    Best regards,

    Andy_Pan


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft..com.

    Friday, September 2, 2016 6:07 AM
    Moderator

All replies

  • It is an array.  Get the array and remove the address then save to array back to AD.


    \_(ツ)_/

    Thursday, September 1, 2016 10:27 PM
    Moderator
  • Hi Vegas,

    Please try this:

     -Remove @{Attribute1LDAPDisplayName=value[];   Attribute2LDAPDisplayName=value[]}

    You could also refer to below:

     help Set-ADUser -Parameter remove

    Best regards,

    Andy_Pan


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft..com.

    Friday, September 2, 2016 6:07 AM
    Moderator