Need to Manipulate Phone Number

Good day all -
Following this blog here (http://blogs.technet.com/b/nexthop/archive/2011/02/01/howtoadphonetolineuri.aspx)  to manipulate phone number is our AD organization.
Unfortunately when Lync populates the contact field from AD it looks at the Telephone Number and Office Number. In our organization these numbers are reversed. Meaning, the 10 digit number is xxx.xxx.xxxx is listed in the "Office"
field of AD and the 4 Digit Extension is listed in the "Phone". With that said, we do have have different calling blocks. Meaning must of our numbers are:
555.555.9xxx
and 555.556.6xxx
All internal extensions (listed in the Telephone number field) begin with 5 and would be replaced with the last xxx in the above example.
So for the 555.250.9xxx block would be 200-499 .... for example extension 5394 would be Direct Dial Number 555.555.9394
And for the 555.556.6xxx block would be 600-799 ...  for example extension 5657 would be  Direct Dial Number 555-555.6657
So my question is this...with the above - how can I populate the below script correctly? Thanks for helping out.
$enabledUsers = Get-CsAdUser -Filter {Enabled -ne $Null}
foreach ($user in $enabledUsers)
        $phoneNumber = $user.Phone
        $phoneNumber = $phoneNumber -replace "[^0-9]"
        $extension = $phoneNumber -match "^5"
        if ($extension)
                $phoneNumber = "TEL:+120655" + $phoneNumber
        else
                $phoneNumber = "TEL:+142556" + $phoneNumber
        Set-CsUser -Identity $user.Identity -LineUri $phoneNumber

Hi Sir,
>>
In our organization these numbers are reversed. Meaning, the 10 digit number is xxx.xxx.xxxx is listed in the "Office" field of AD and the 4 Digit Extension is listed in the "Phone". With that said, we do have have different
calling blocks. Meaning must of our numbers are:
555.555.9xxx
and 555.556.6xxx
Based on my understanding , you are going to get a number from "Phone" such as 555.555.9xxx and get a 4 digit extention number . Then you want to get the latest three number of the "Extention" number then replace "xxx"
to get a direct dial number and save it into AD .
Do you mean the "Office" field and "Phone" field  are  "Office" and "Telephone number" in AD user properties :
I would suggest you to use The method substring() to cut and connect the number .
E.g. If you want to cut the  first three number  of 123456 the command may:
$a="123456"
$a.substring(0,3)
Best Regards,
Elton JI
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

Similar Messages

  • Need a REAL phone number to schedule repairs

    I spent an hour on the phone yesterday, trying to REQUEST that someone come look at my multifunction machine (we're a HUGE international business, just like HP).
    After being transferred to at least 5 different departments because the person at HP:
    1) from the model number, couldn't figure out what kind of machine I have.....???????
    2)  couldn't understand my serial number....they kept telling me it was not a valid serial number, even though I was reading it off the machine configuration page that I printed from the printer's administration menu....???  After repeating the serial number twice, I was passed immediately from a phone operator to a manager.
    2)  they didn't know the appropriate department to transfer my call to.....???
    FINALLY someone was (with random 10-minute hold intervals) able to enter a ticket into the system and issue me a case number.  That took AN H-O-U-R.  Then I had to wait till THE NEXT DAY for someone else to call and tell me that someone would be at my office within a 2-hour interval to repair the machine.
    When he walked in the office, he was aware of only ONE of the issues I'd called HP about...even though I repeated BOTH issues to the ~4-5 people I talked to while they transferred me from department to department.  (A constantly-jamming tray and a loose network port......on a 5-month old machine that's used by ~30 people.)  Unfortunately, it wasn't my regular repair guy (yeah, this isn't the first repair we've needed), otherwise I would have talked to HIM about my frustrations.
    I need a REAL phone number where I can call this repair-scheduling-center DIRECTLY.  WHEN the next problem with my machine(s) happens, I do NOT want to have to spend another hour on the phone, trying to schedule repairs.
    Can someone provide me with this direct line?
    Thanks in advance.
    There was no appropriate board to post this on, so I apologize for posting it on the wrong one.

    I just noticed that the repairman has been on the phone for 30 mins about our repairs.....most of it has been on hold.

  • Need to change phone number

    I need some assistance changing my mobile number

    pai529,
    I'm sorry about that! Visit http://www.verizonwireless.com/support/how-to-change-phone-number-video/ to view a video on how you can change your number online via My Verizon. Once you'r ready to change your number visit https://login.verizonwireless.com/amserver/UI/Login?realm=vzw&goto=https%3A%2F%2Fmyaccount.verizonwireless.com%3A443%2Fclp%2Flogin%3Fredirect%3D%252Fvzw%252Faccountholder%252Fservices%252FchangeMDN.action%3FfromChangeMdn%3Dtrue and sign in to My Verizon. It will take you right to the option to change your number. Keep us posted if you need further assistance.
    JohnB_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Need to have Phone Number field as just numbers with no formatting.

    We have a web service that is passed the work phone field from the contact object. That WS uses the phone number to auto-dial the customer's number for our sales reps.
    My issue is that the WS expects to just see the area code and the phone number as digits as 1235554444. It has been working fine for over a year and recently been failing as now the numbers come in with a "+" sign.
    The format seems to change depending on the time of day I look at the fields and is random for each user. The company profile is set to USA as the default and so are the user's locale settings.
    How do I make the "+" go away?
    I have tried various settings and couldn't seem to find one that didn't give me the formatting. I've also tried to copy the work phone field to a hidden field and using WF to strip out the "+" but there seems to be no way to do a REPLACE() function in a WF rule.
    Any ideas?

    So after spending enough time with this I was able to find a way around the issue. Ultimately I needed a phone number format that was fixed and would not mask the data per the user's locale settings. It also needed to be just area code and phone number shown as 1112223333.
    On the contact object, a new field was created as a Short Text. Then a WorkFlow as created that copies over the value from the WorkPhone field into this unformatted number so that it can be passed to our Web Service.
    It took a while for me to figure this out since if you just use the WorkPhone variable you get all the masking based on locale. I didn't have the functions available to me in the WorkFlow to just strip spaces and "+" or "( )" so I needed it to be as close as I coudl to just a basic phone number. By using the FieldValue() function it seemed to take a number like 1 (555) 444-4444 and return 1 555 4444444. This works no matter if it was +1 555 4444444 or +41 555 4444444 so I could then use some pattern logic.
    This is what I used to copy that data over to my temp/work field which is now passed to our click-to-dial function.
    Mid(FieldValue('<WorkPhone>'), InStr(FieldValue('<WorkPhone>'),' ') + 1,3) + Right(FieldValue('<WorkPhone>'),7)

  • Need help with phone number keypad please

    I have found when using my iPhone to call certain phone numbers requiring me to enter an extension number, I'll get a message that it's an invalid extension and try again, I try at least 2-3 times and still get the same message. Well I'll call back on a different phone and enter the exact same extension and it goes through. It's not always the same phone number/extension but it happens everytime I make a call on my iPhone that requires an extension to be keyed in.
    Does anyone have any suggestions or idea what I can do? I've reset the phone several times but it doesn't help.
    Thanks in advance,
    iPhoNettie

    Time to give AT&T a call.

  • Need to recover phone number from a deleted text message

    Last night someone was texting me. I didn't recognize the number and when I asked how he got it he avoided the question. Dumbly I deleted the text messages and now really want to track down whoever it was that was texting me. How can I find that phone number? Sometimes if I don't save a number my iphone 4 will show me recent numbers I've texted but this one doesn't show up and I can't remember it. I haven't backed up or anything so recovering it is not an option. I don't want to have to shell out money to recover it either. I was using Wondershare Dr. Fone and it found the texts but they charge $100 to recover them. Any better options?
    Thank you so much

    Even though you deleted the text - it might still be discoverable using your Spotlight search. On the home screen swipe from left to right to access the search. Use a word that was in the message.

  • Calling Any contact need to display phone number

    Hi Team,
    We have got updated to 10.2 for BB Z10 and its good improvement.
    Basic function to display phone numbers when calling contact is still missing and should not be acceptable.
    Phone number gets displayed when call is connected but not before.
    This is important as sometimes we have multiple phone numbers per contact.
    Thanks,
    Ravindra

    Good to know you like 10.2

  • 2003 outlook - need tech support phone number

    2003 outlook - need tech support phone number

    Hi,
    Contact Microsoft Technical Support
    http://support.microsoft.com/select/Default.aspx?target=assistance&FR=1
    Select your product from our directory to contact a Microsoft Support Professional by e-mail, online or telephone.
    Phone Contact - 1-800-MICROSOFT (1-800-642-7676)
    Best regards
    William Zhou
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • I have a huge problem with illustrator on the CC and I need a support phone number

    When I open Illustrator there are no tool boxes and no options to open them...

    Ken,
    You may try the list, or use the chat/phone options below )only available for CC and on workdays), probably the former is faster:
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media, see below. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html
    Creative Cloud support (all Creative Cloud customer service issues, chat open between 5AM and 7PM PST/PDT on workdays)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html

  • I need help with phone number transfer

    I just purchased the iphone and I can not get service yet. My cell phone is without service now, but the iphone does not have service yet. How can I check to see if I entered everything correctly, I did not get any errors.

    Time to give AT&T a call.

  • HT1923 need technical support phone number

    you messedy I tunes none of theitunes play and I have windows 7 not windows XP I just got hard drive replaced and was trying to recover - restore my itunes now nothging works I had multiple copies but at least one of the copes playedf i set player  setting now every ting you did is all messed up can you just put my stuff back so my vidios and music and movies Pic worki thank you Ruben

    There is no telephone support for itunes.
    Contact them as everyone else does:
    http://www.apple.com/support/contact/
    Maybe if you were to explain your issuse here, using sentences and punctuation please, then someone could help.

  • Nokia 7230 - How to insert a phone number from Con...

    I know this is an issue with some other models, but HOW do I insert a phone number from my contacts into a text message?
    -If I go to Phonebook and "copy" number, then I try to paste it into my message, I get an answer that there is nothing to paste.
    -I cannot open the phonebook while I am in the texting window, there is no option, in old models one had "insert telephone number", with 7230 I can only  insert a smile or special character.
    -I DO NOT WANT to send a MMS with visiting card, just plain sms with a number taken from my contacts.
    Thanks to whoever can help!
    Mod

    Hi modjadii,
    The compact UI style used in 7230 does not allow copying phone number to text message the same way as in some previous models but please try this as a solution.
    Write a text message and when you need to insert phone number from your contacts select Options - More - Exit editor (or just press End key to return to idle screen). The text you have already written stays at the text editor and is visible once the editor is opened again.
    Open your contacts by choosing Names and select Options - More - Business card - Via text message and search the contact whose number you want to copy. After selecting the contact you'll get the phone number to screen and you can select Options - Editing options - Copy all.
    Now the number is copied for pasting and you can open the text message editor again and select Options - More - Modify text - Paste.
    Hope this helps.
    jakivi

  • Can anyone give me Support Phone number of site catalyst ?

    Hello,
    I would need customer support phone number of site catalyst for India.
    I want to see the revenue generated by adwords campaign.
    Regards
    Pulkit Thakur

    This is Business Catalyst Not site Catalyst forums.
    IF you do mean Business Catalyst - there is no phone support.
    This may help if you mean Site Catalyst and google ad words:
    http://www.numericanalytics.com/adobe-sitecatalyst-and-google-adwords/
    I do not believe there is any phone support for that either. Posting in the right forum may get better help from people there though.

  • How do I enable my cell phone number in iMessage?

    I recently had to change my apple ID and ever since then the iMesages that I send have been coming from my email address/Apple ID.
    I no longer receive iMessages that people send to my cell phone number.
    When I go into the iMessages settings, my cell phone number is grey and my email address is blue with a check mark next to it.
    iMessage is stuck on "waiting for activation."
    One more side note.. I am in Switzerland and I usually don't live here but I need my cell phone number to be registered on iMessage to communicate with my contacts.
    Can someone please help me with this? Is there any way to solve this?
    If so, please let me know. I would really appreciate it.
    Thanks!!

    Read this
    http://support.apple.com/kb/TS4268

  • How to cause them to associate my Case Number 185689167 with the real phone number I need to be called at:

    I purchased a one year subscription to Acrobat Pro, and after installation on my MacBook, in the LaunchPad (aside from the normal Adobe Acrobat Pro, Acrobat Distiller, and Forms Central for Acrobat) a folder containing two icons.  The first was (I forgot the name) and the second entitled AAMLauncherUtil.  Shortly after installation I ran the AAMLauncher Util, and it downloaded and "updated" Acrobat Pro and installed Creative Cloud.  I was told by some person in Tech Support that I didn't need these two additional icons in LaunchPad, and I could just drag them to the trash.
    The folder would not go in the Trash, so I dragged them out of the folder and then the one whose name I don't remember was able to go to the Trash, but not the AAMLauncherUtil icon.
    I called Tech Support again, and got a technician whose name I will withhold, but although he tried to solve the problem, basically he was clueless and I could hear him asking other people in the background what to do and they were giving him suggestions, mucking around my library and deleting anything that sounded like it was associated with AAMLaucher, and in the end all he succeeded in doing was making my Creative Cloud not work anymore and produce messages that it was corrupted and had to be removed and reinstalled.  Finally he gave up and said that he was referring my Case 185689167 to the next level higher of tech support, who would call me within 24 hours.  Of course they never did that so I called Apple Support and a representative there went way beyond what he needed to do and we were able to uninstall and reinstall Creative Cloud and make it work again, although the AAMLaucherUtil icon remains there.  Currently, it doesn't update anything like it did the first time I ran it, or act like it is trying to update anything, but it does open Creative Cloud if you have closed it. 
    Several days later (not the promised 24 hours) I got an email from my Voicemail Service with a  transcribed message from Adobe Tech Support saying that they had tried to call me... at the number listed in my subscription payment details... NOT at the number I had told them to call me at, and since I am 7000 miles away from my billing number I didn't get the call.  The message requested me to call them back.  I did so, and the message on the VRU said I would have to wait approximately 30 minutes. Two and one half hours later (not 30 minutes) someone answered who was not Second Level Tech Support, and reiterated that it was not possible to transfer me to them, and he would note that I had called back and they would call me within 24 hours.... yeah right.  By then after waiting all that time to speak to someone I was so mad that I forgot to mention the correct number to call me at... although I had mentioned it previously.  Several days later (not 24 hours) they called the wrong number again, and when I didn't answer it then sent me an email that they were considering the case solved and closing it, and I could reopen it within 14 days. 
    I then called back and this time waiting 3 hours on hold, and the person who I spoke with (whose name I withhold for now) said he would reopen the case and they would call me within 24 hours... again he couldn't transfer me to them.  Again I forgot to reiterate the correct phone number that I had told them the first time since I was so mad about waiting 3 hours on hold.
    The next day, I realized that I had not reiterated the correct phone number, and I went into my account settings and changed the phone number in both places it exists, and then tried calling back to make sure they would call the correct phone number.  This time I waited on hold for 4 hours, and finally gave up without ever being able to speak to a person.
    The next day... still no call even to the wrong number since my Voice Mail would have informed me it there was a call.... I called Sales since that seemed to be the only way to talk to a real person, and screamed at them about this issue and was informed they couldn't do anything about Tech Support, or about associating my phone number with my case number, but he would put me in the queue for tech support since nobody was in the queue so they should call me back right away. 
    I did get a call in a few minutes, which said "If Valued Customer is available, press 1" so I pressed 1 and it went to music.  I then waited for 15 minutes of music with no answer, after which I got an email from my Voicemail Service transcribing the message saying:
    "Reschedule this call back for a later time press three to cancel this call back press nine. Your response was not recognized. Please try again. When valued customer is on the line press one to speak to a support specialist. If you need time to get valued customer on the line press two. To reschedule this call back for a later time press three to cancel this call back press nine. Your response was not recognized. Please try again. When valued customer is on the line press one to speak to a support specialist. If you need time to get valued customer on the line press two. To reschedule this call back for a later time press three to cancel this call back press nine."
    ... more. Please listen to your voicemail for the remainder of this message.
    They can't recognize me pressing 1?????  So who know... I was listening to music but did that mean I was really ever going to reach a real person, or was the Voicemail message correct and I would be listening to music forever?
    So this morning I tried calling again only to receive message the the Tech Support Telephone Lines were down for scheduled maintenance until August 10th... I tried chatting... that is offline also.
    Is there a way to associate my actual phone number with my case number... maybe somebody from Adobe actually reads these diatribes?  I need to be called at or after 17:00 Pacific time.... I was told the hours are on Pacific Time.... although  one representative who I was trying to coordinate the timing of the call with was very confused about the time zones. He was trying to tell me that the current time was 09:00 Pacific Time, which I knew to be wrong, and he finally admitted, after I challenged him to look on www.timeanddate.com, that it was  09:00 in Bangalore, and Pacific time was 20:00.

    Thanks for your answer TSN!
    I did try Chat yesterday and it didn't work.... said unavailable.  I'll will try it again. 
    I do understand that this is a Community Forum, but it appears that some Adobe staff persons do read and respond to some messages, so since all other avenues of contact seem to not work, I thought I would try this just in case somebody from Adobe happened to read it and could do something.
    A secondary reason I posted the whole explanation is that I thought maybe somebody else had experienced this issue as well and might comment on it.
    As for it being a problem or not, maybe it is not.  Adobe did work when I installed it.  When I invoked that icon "AAMLauncherUtil" the first time, it updated Acrobat Pro and Installed Creative Cloud (which the original trial subscription had not installed).
    I then noticed that these two icons didn't seem to do anything useful.  The first time I called and was able to connect to support, the rather poor attitude person who answered just said to delete both icons in the folder... that they weren't needed.  When I found that one of them could be deleted and not the other one "AAMLauncherUtil" could not be deleted, and since the tech support person had suggested deleting them both, I called back.
    The next rather clueless person in tech support spent a lot of time trying to help get rid of it, but couldn't.  When he was mucking around in the "Library" he deleted everything named "AAMLauncherUtil" from the Library (but left some stuff I would have imagined could have been deleted like references to my previous trial subscription.
    After he got done, Creative Cloud no longer worked and he couldn't figure out how to fix it... we were getting messages the Creative Cloud was corrupted and needed to be uninstalled.  He said he was going to refer the problem to a  higher level tech support, and that he couldn't transfer me there... they would have to call me which would be in 24 hours.
    The next day (since the higher level tech support failed to call back) I called Apple Support, and they helped me find a Creative Cloud Uninstaller and we ran that and re-downloaded and installed Creative Cloud again.
    I would expect from the name "AAMLauncherUtil" that this icon would Launch Adobe Application Manager and perhaps try to update my product(s) like it did the first time, OR report that my software is up to date... as most other software update attempts would do.  However what it really does now when I invoke the "AAMLauncherUtil" icon is just to open Creative Cloud just as if I had clicked on the icon in the top menu bar of my Apple Menu Bar.  The Apple person suggested that MAYBE it is supposed to do that if you have shut down Creative Cloud for some reason, and want to start it up again without restarting the computer.  Maybe that is so, but if it is, then I would have expected that they would have renamed the icon to Creative Cloud or something more descriptive of what it is supposed to do.
    As is is now, I am not sure if it is a leftover remnant of my original updated installation that should have gone away when I updated and it installed Creative Cloud, or if everyone else running Adobe Acrobat Pro XI has this icon in their Launchpad as well and it is supposed to be there for some unknown reason to perform some unknown function.
    After all that happened, I did update Creative Cloud, but that was within Creative Cloud itself when it reported having an update available, and not using the "AAMLauncherUtil" icon at all, so that would appear to negate it's possible update functionality wouldn't it?
    Assuming you are using a Mac, do you have such an icon in LaunchPad?
    Thanks for your help!

Maybe you are looking for