locked
Ran script with wrong email address RRS feed

  • Question

  • I ran this script to change the name of UserA (userB name was changed the same day and I forgot to make corrections to the email address):

    Set-AdUser -Identity userA.someplace -replace @{'msRTCSIP-PrimaryUserAddress'= "sip:userB.someplace@somewhere.com"} -Verbose

    But it was suppose to be this. I caught it within minutes. And ran the below script.

    Set-AdUser -Identity userA.someplace -replace @{'msRTCSIP-PrimaryUserAddress'= "sip:userA.someplace@somewhere.com"} -Verbose

    My issues is, now when anyone is trying to email UserA in Outlook or OWA they are typing userA name in the TO field they see userA name being displayed but userB email address is also displayed with the little picture. UserA is getting all of the emails sent. The SMTP in AD and Exchange are correct. UserB is no where linked to userA account accept in the TO field. The GAL has been updated. The Auto Complete Function has been cleaned out. I am not sure what I am needing to correct the TO field to show the correct information for userA...name AND email address. UserA name is correct it shows show userB email address but it sends to userA without any issues. This happen about 30 days ago. Any suggestions?

    Friday, October 11, 2019 10:37 PM

All replies

  • That is what happens when you rename a user. Just switch the names back and all should be right. Use ADUC to fix this so you don't flub it again.


    \_(ツ)_/

    Friday, October 11, 2019 10:41 PM
  • Meaning re-run the script with the correct name or switch the name back to the original name and then try it again with name change? UserA had a name change due to marriage and wants everything to be updated correctly. UserB had the same thing (name change due to marriage) and UserB is showing correctly everywhere including the TO field. UserA is showing correctly EVERYWHERE except in the TO field which shows correct name and UserB email.
    Friday, October 11, 2019 10:54 PM
  • Changing only the SIP address should have no effect on e-mail delivery. What else was changed on those two users?

    Updating the OAB is okay, but verify that OAB sync is working on your distribution servers. The OAB has no effect on OWA.

    Examine the EmailAddresses property on both users. Pay close attention to the X500 addresses. It's those X500-style addresses that Outlook and Exchange use. The other addresses types are used to locate the mail-enabled object, but the X500 address is key.

    Try (with Outlook) to send an email to those two users using their X500 addresses (if there's more than one on a user then pick the one with X500 in upper-case -- that's the primary address of this type). It should be delivered correctly. IIRC, the "To:" address would look like this: "[X500:.....]" -- the square brackets are necessary.

    BTW, if you're messing with SIP and it's on-site Lync, why are you not using the Set-CSUser cmdlet? Why mess with AD properties directly. The same goes for Exchange stuff. Use the application-specific cmdlets. They have a lot of built-in stuff that sometimes is necessary when you think all that needs changing is something simple like the msRTCSIP-PrimaryUserAddress. 


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Proposed as answer by jrv Saturday, October 12, 2019 2:36 AM
    Saturday, October 12, 2019 2:34 AM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee

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

    Friday, November 8, 2019 2:02 PM