How to change sip address after changing email address for bulk users

We are in the process of adding new primary email address as [email protected] for 500 users. 
current primary email address is [email protected] and 
currently all LYNC users has sip address as [email protected]
Now we need to change the LYNC SIP Address as their primary email address ( [email protected]). does any one has script to pull the users from CSV and change the SIP Address as their primary email address.
I got below script from internet , but this is not going to help me, as this script is to enable SIP Address and mark the sip address as same as the email address.
any help in this matter is greatly appreciated.
$users=Import-Csv .\users.csv
ForEach ($user in $users){
    Write-Host    $user.alias
    get-csaduser $user.alias | Enable-CsUser -RegistrarPool "PoolServer.domain.com" - SipAddressType EmailAddress
Srinivasa K

Raju, getting below error.
You cannot call a method on a null-valued expression.
At C:\Srini\lync.ps1:5 char:4
+    $newAddress=$oldAddress.Substring(0,$oldAddress.IndexOf("@"))+"@test.com"
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Set-CsUser : Cannot bind argument to parameter 'Identity' because it is null.
At C:\Srini\lync.ps1:6 char:25
+    Set-CsUser -Identity $User.Identity -SipAddress $newAddress
+                         ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-CsUser], ParameterBindingV
   alidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
   icrosoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
You cannot call a method on a null-valued expression.
At C:\Srini\lync.ps1:5 char:4
+    $newAddress=$oldAddress.Substring(0,$oldAddress.IndexOf("@"))+"@test.com"
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
Set-CsUser : Cannot bind argument to parameter 'Identity' because it is null.
At C:\Srini\lync.ps1:6 char:25
+    Set-CsUser -Identity $User.Identity -SipAddress $newAddress
+                         ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-CsUser], ParameterBindingV
   alidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
   icrosoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
Srinivasa K

Similar Messages

  • My email account is changing soon.  How do I change my apple to new email address.

    My email account is changing soon.  How do I change my apple to new email address?

    since nobody knows what "my apple" is, I'm going to assume you're referring to your Apple ID, so.... http://appleid.apple.com

  • I have changed my apple I'd email address so when I log in it is correct. But when my friend iMessage me it only works to my old email not my current one. How can I sort this out???

    I changed my apple I'd email address and when I log in I use that email and the right password both work. But when my friend iMessage me it only works if they send it to my old email address not my new current one. How can ai change my iCloud and iMessage address?? To match my current one?

    So have you changed the accounts in the iCloud and Messages Settings?
    Settings > iCloud > Account
    Settings > Messages > Send & Receive

  • How do I change old out of date email addresses in Mail

    How do I change old out of date email addresses in Mail

    Mail/Preferences/Accounts - select the account using the - sign at the bottom. You also might want to go to a good account, select Outgoing mail sever (SMPT), click on the dropdown menu, select Edit SMPT server and make sure there are no servers left associated with the old e-mail addresses.

  • Since I upgraded to IOS7 the iCloud update app shows an old email address.  How do I change this to my current email address?

    I upgraded to IOS 7.0.2 and now the guide for iCloud update shows my old email address.  How do I change this to my current email address?

    Go to Settings>icloud, scroll to bottom of screen and tap Delete Account.  Then log in using a different ID.

  • How do I change the default apple id (email address) that is prompted on my iPhone? It prompts me with an id that I do not have and cannot access.

    How do I change the default apple id (email address) that is prompted on my iPhone? It prompts me with an id that I do not have and cannot access.

    When do you get prompted for this ID? If you are asked for an AppleID
    you do not know during Activation, contact the seller for assistance. Only
    the person who set the Activation Lock can remove it. If the seller refuses
    or does not know the requested AppleID and passcode, return the iPhone
    for a full refund as it is useless. There is no work around for Activation Lock,
    The person who set the lock needs to follow the actions in this link:
    Prepare your device to sell or give away
    You can check if Activation Lock is the problem here:
    https://www.icloud.com/activationlock/
    That link will only tell you if the iPhone is Activation Locked - it will not provide
    any information about the source of the lock, nor can you get any information
    from any source other than the original owner of the iPhone/person who set
    the lock.
    iCloud: Find My iPhone Activation Lock in iOS 7 & later
    http://support.apple.com/kb/HT5818?viewlocale=en_US&locale=en_US
    http://support.apple.com/kb/TS4515

  • HT204053 how do I change my recently chosen icloud email address to a different one or add on a 2nd one, keeping the first?

    how do I change my recently chosen icloud email address to a different one or add on a 2nd one, keeping the first?

    If you are wishing to change your @me address, this cannot be done, however if you wish to change another address;
    You need to change your details with Apple,  Start here, change your country if necessary and go to manage your account.

  • Can I change my actual (main) iCloud email address, and if so how?

    Can I change my actual (main) iCloud email address, and if so how?

    Once you have created an iCloud account and chosen an @icloud.com address to go with it you can't change the address (short of creating an entirely new account).
    However, all is not lost. You can add up to three 'email aliases' - these are additional addresses (not accounts) which deliver into the same inbox as the main account. (In fact it's a good idea to give out alias addresses, rather than the main address, because if they attract spam you can easily change them.)
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account or move it to another account.
    More information on aliases here: http://help.apple.com/icloud/#mm6b1a490a

  • How can I change or add a rescue email address?

    I have forgotten my security questions and don't want to contact apple support, I have been told by an apple genius that I can get an email to reset them. I have looked and and you need a rescue email address, which I don't have, whhich takes us back to my original question; How can I change or add a rescue email address?

    See Kappy's previous write-up.
    Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities

  • Change display name of workflow email address in sharepoint 2010

    Hi
    How I can change display name of workflow email address in sharepoint 2010. I want to configure display name (from address)of email
     for each site collection separately.for example I want to change "software unit"
     in below pic to another name for my software unit site collection.
    How I can do this?
    Thanx.

    Hi,
    According to your post, my understanding is that you want to change display name of workflow email address in sharepoint 2010.
    In my environment, if I assign a task to a user, the email is as below:
    The “test” is the site name, the [email protected] is the “From” user.
    Do you want to change the “From” field in the workflow?
    If so, you can have a look at the "Send email extended" custom SPD workflow activity (http://www.codeplex.com/SPDActivities
    ) which allow you to specify the sender.
    Here are some similar threads for your reference:
    https://social.technet.microsoft.com/Forums/en-US/22d95510-95b7-4882-b988-4038e59fb031/how-to-change-the-display-name-for-sharepoint-emails-sent-using-workflows?forum=sharepointgeneralprevious
    http://sharepoint.stackexchange.com/questions/19186/changing-from-email-address-in-sharepoint-designer-2010-workflows
    http://sharepoint.stackexchange.com/questions/61964/how-to-change-the-from-address-in-feedback-workflow-email
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • One of my children changed my security questions and email address in my AppleID. Is there a way to recover or change this?

    One of my children changed my security questions and email address in my AppleID. Is there a way to recover or change this?

    Sure there is: You can ask your child to teach you how to do it, or you can go to this page and learn how to do it yourself.

  • Just moved- do I need to change my Apple ID and email address on record since I no longer have access to my previous emails?

    Just moved- do I need to change my Apple ID and email address on record since I no longer have access to my previous emails?
    I used to be with roadrunner and no longer have roadrunner. I now have a gmail account.

    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796?viewlocale=en_US&locale=en_US
    iTunes Store: Associating a device or computer to your Apple ID
    http://support.apple.com/kb/ht4627
    iOS: Changing the signed-in iTunes Store Apple ID Account
    http://support.apple.com/kb/ht1311
     Cheers, Tom

  • I changed my Apple ID (new email address, same account), but when I try and use my iPad, it is asking me to sign out and delete the account, losing all data.  If I do this, will it all still be there on my new ID? Thanks.

    I changed my Apple ID (new email address, same account), via the Apple website on my laptop, but when I try log into ITunes on my iPad, it still has the old ID.  It is greyed out, so I can't change it.  On researching further,  it seems I have to sign out of iTunes and sign back in using new address.  Ok so far, but when I do this, it asks if I want to delete the account and any data on the cloud.  If I do this, and sign in with changed ID, will all the data be there Or will it be lost?  Thanks for any advice.

    Sounds like apps purchased from those accounts got synced to the iPod and it is asking to log into that account to update them.
    - Apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.
    What do yo see if yo go to the Updates Section of the App Store app?

  • I changed my Apple ID (other email address and password) and now I can not login to my account in the iPhone iCloud. When I open the tab iCloud displayed my old Apple ID (it was in the iCloud) and asks for a password, but neither the old nor the new passw

    I changed my Apple ID (other email address and password) and now I can not login to my account in the iPhone iCloud. When I open the tab iCloud displayed my old Apple ID (it was in the iCloud) and asks for a password, but neither the old nor the new password does not match. What to do?

    If you want to change your iCloud ID or password on your phone go to Settings>iCloud and tap Delete Account, then sign back in with your updated information.  Note: this only deletes the account and any synced data from your phone, not from iCloud.  Provided you are signing back into the same account and not changing accounts it will be synced back to your device when you sign back in.

  • I have just connect my iPhone to iCloude and it is showing my sons address in the setting any change i can change that to my own Email address.

    I have just connect my iPhone to iCloude and it is showing my sons address in the setting any change i can change that to my own Email address.

    Welcome to the Apple Community.
    You need to create and use your own iCloud account.

Maybe you are looking for

  • Shared Apple ID has become a problem and I can't figure out how to be unshared.

    Originally, there was iTunes and the iPod.  We had one computer with the music on it, and the iPods were all connecting to that single iTunes account, all with a single Apple ID.  Then came the iPhone, which needed an iTunes account to set up, update

  • Where do I find my WiFi password if I forgot it?

    I bought an I-Pad and am setting it up. I clicked United States and English..now I'm on the screen that wants my Wi-Fi password, which I don't remember....how do I get a new password for my WiFi, or get past this screen?

  • CS6 Installing problem after uninstalling (exit code 34)

    Exit Code: 34 -------------------------------------- Summary -------------------------------------- - 1 fatal error(s), 0 error(s), 0 warning(s) FATAL: Payload '{11C0657F-2BD4-4CBC-87F3-9455DC91886E} Recommended Common Fonts Installation x64 6.0.98.0

  • Deleted Keepsake Book

    I have accidentally deleted a Keepsake Book. Is there anyway to recover it? (Previously posted on another/wrong board). Thanks for any help.

  • Plz he;lp me

    In 2tables  there is no key fields then how we retrive data from thaose 2  tables