Take last 4 digits in Business Phone and add to IP Phone atttribute

Hope someone can help. We have all our users 10 digit phone number in Active Directory under the Business Phone. We are integrating our Phone system with AD but want to pull the IP Phone attribute from AD into the phone system. Does anyone know of a way
to look at the users Business Phone attribute and look at the last 4 digits of the number and add it to the ip phone attribute. We are hoping to not have to do this manually for each user.
Thanks,
Gavin
 

Hi Gavin,
Assuming you're referring to the 'Telephone number' field in ADUC, this will do what you're after:
Get-ADUser -Filter * -SearchBase 'OU=Test 1,DC=domain,DC=com' -Properties OfficePhone | ForEach {
$phoneNumber = $_.OfficePhone.Substring($_.OfficePhone.Length - 4, 4)
Set-ADUser -Identity $_.SamAccountName -Replace @{ipPhone=$phoneNumber}
This will replace the IP Phone field with the last 4 characters present in the telephoneNumber attribute for every user in the targeted OU.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing)

Similar Messages

  • Create a customer code using the First letter of a customer name and the last 4 digits of a phone number

    I am trying to create a form where one the customer has input their name and phone number it should grab the first letter of the customer's name and then the last 4 digits of the phone number.
    I am not very good at coding, and have VERY VERY limited background in coding. I understand a little (the basics pretty much).
    I am thinking i am not using the right expression to get what i want. Below is the statement I have write. This is just to find the first letter of the name, have an idea on how to get the phone number but i was trying the use the "left" and "right" functions but they wouldn't work. More specifically the left.
    form1.#subform[0].CustCode::initialize - (JavaScript, client)
    str = CustName;
    var a = str.substr(0, 1);
    any help would be greatly appreciated.
    If more information is needed, please don't hesitate to ask.

    If you switch your language to FormCalc you can use the Left and Right functions, e.g.
    Concat(Left(Name,1) , Right(Phone,4))

  • I tried to use Apple Pay at the 1280 Lexington Ave store in NY but was asked for the last 4 digits of my cardnumber and it never worked.

    I tried to use Apple Pay at the 1280 Lexington Ave store in NY but was asked for the last 4 digits of my cardnumber and it never worked. The question itself made no sense but I tried in vain by supplying it as well as the security code. I didn't know the last 4 of my proxy card number.

    Open Passbook, select the credit card you are using, touch the Info icon on the lower right. This will display the last four digits of the ‘Device Account Number’. These four digits are what your retailer wants to complete the transaction, NOT the last four digits of your card number. Some retailers require this, others do not.

  • Last 7 digits of contact phone numbers confuse Synegy?

    Hi -- I have posted a more detailed description of the issue (including how I came across this issue) at:
    http://forums.precentral.net/palm-pre/213995-weird-sms-addressing-feature.html
    Basically, my issue is this:
    Background:  All phone numbers in my contacts list are 10 digit U.S. numbers with (ABC) DEF-GHIJ format.  99% of my Synergy contacts are from Google with just 10 or so of 700+ coming from my company's Exchange.  To my knowledge, I currently DO NOT have multiple contacts with the same last 7 digits DEF-GHIJ, but during my personal testing for this issue, I did create a dummy contact record (see below)
    Issue(s):
    *  Let's say I have a contact record for my wife which has her mobile # as 617-DEF-GHIJ.  If I begin a new SMS (using phone # to address the SMS rather than her name) to XYZ-DEF-GHIJ, where XYZ is ANY random 3 digits....555, 567, 345, etc... then the contact field will update to populate with my wife's name after I move the cursor focus to the SMS body text.  I have not actually tried to complete an outbound text this way, but I believe the text would actually be sent to the XYZ... area code and not actually to my wife's 617 mobile # (I assume this based on the phone call analog below)
    *  Same issue with phone # dialing:  I dial XYZ-DEF-GHIJ instead of my wife's 617-DEF-GHIJ.  On pressing send, the phone connection screen show's my wife's contact name and her contact photo (along with the incorrect XYZ phone number).  However, the call is routed to the incorrect phone #.
    *  Finally, I added a test contact "Joe Test" with a phone number of 555-DEF-GHIJ.  In doing so, Synergy immediately linked the new Joe Test contact as second profile under my wife's contact record.  It also changed her name in my SMS history to now reflect Joe Test rather than my wife's name...  I didn't realize this happened until I saw that Joe Test had sent an SMS asking me to bring home some milk.  I then unlinked the Joe Test profile from her contact record.  (leaving him in my contact list as his own separate contact entry).  However, even when unlinked from her profile and with not exactly the same phone #, her full SMS history still indicated Joe Test and not my wife's name.  Only after I deleted the Joe Test record from my contact list was my wife's photo and name correctly re-attached to her SMS history (this might have only happened after she sent me a new SMS message and not immediately).
    Clearly, this was some intentionally implemented feature to support 7-digit dialing or the synergy contact linking gone awry.  Also, clearly it's not likely to greatly impact a lot of people, since a user must have two contacts with the same 7-digit phone number (within a 10 digit phone record entry) to really be impacted.  However, it seems to be a significant enough problem that it should be addressed in a future update. 
    Please advise if my issue report is unclear or cannot be repeated at Palm.  I don't have access to another WebOS device yet, but I am nearly certain that this is not an issue solely related to my Pre.  I'm happy to help debug if you cannot repeat the issue.
    best,
    John Greenaway
    Post relates to: Pre p100eww (Sprint)

    Still there, and definitely a bug
    Presumably as part of the Synergy implementation, the Prē apparently considers any telephone number string, including multiple numbers associated with the same contact, ending in the same last seven digits to be the same.
    Unfortunately, this is not as unlikely as the original poster supposes: even discounting the "birthday paradox", reuse of PINs--especially of six or more digits, followed typically by '#'--makes the problem especially obnoxious for multiple, personal voicemail numbers embedded in a single contact entry: all but the first is hidden, except when editing the contact.
    The only workaround seems to be to pad with trailing, timed delays ('t'), so that the comparison will fail: since the telephone app permits "dialing through" a delay, it doesn't interfere with use of a service, but is highly counterintuitive!
    egr

  • I got a first generation IPOD TOUCH for my husband and want to take some songs From my Computer that is hooked up to MY newer IPOD (not Touch, just IPOD)  Is it possible to take the music from my ITUNES account and add the his IPOD Touch without changing

    I am trying to take songs from my PC AND My Itunes account and send them to my husband's IPOD TOUCH First Generation BUT I don't want to change my whole ITUNES account that is already on my computer.  When I plug HIS Ipod Touch into the PC, my ITUNES account wants me to CHANGE the DEVICE Name on the account and I don't want to do that.  I only want to share SOME of my songs on my Itunes account and send them to h is IPOD TOUCH?  Is this possible and HOW!  Thanks a ton!!!  I "checked" off the songs that I want to send but that's as far as I get before it asks me to change the Device Name?

    Is his iPod usually synced to a different iTunes library/computer?  If so, that would explain the message iTunes is giving you.  An iPod is designed to sync with only one computer/iTunes library at a time.  If you try to sync it with a new library, the iPod's contents will be erased and replaced with what is in the newer/different iTunes library.
    So if there is content you would like to add to his iPod, simply transfer it from your iTunes library to his.
    B-rock

  • Create a Business Object and add to transaction MASS

    Hi folks, I would like to know if it's possible to create a business object for 2 tables and use this with standard transaction MASS for mass maintenance.
    I want to use transaction MASS for mass maintenance on the foreign trade data, 2 table will be available eikp and eipo. I think I will have to create a business object, first it is possible and how will I setup all this,
    thanks

    Hi,
    Check this link.
    http://www.erpgenie.com/abap/bapi/example.htm
    aRs

  • How to take a specific image on a website and add to keynote presentation?

    Hi, Everybody--I'm a neophyte keynote person, and I've only sporadically used PowerPoint. I remember that in PowerPoint I could take an image from a website, crop the image, and then copy it onto a slide. I've been trying to do that through keynote, but I haven't found a way to do it. For example, if I were to find a good picture of George Washington on the web and wanted to use it as a slide, how could I do that? Thanks.

    If one is the in the US, this kind of activity may be governed by the fair use provisions of US copyright law. Essentially, if you are using material for non-commercial, educational purposes, and are not using large portions of a work, then you should be OK. It would, however, be a courtesy to let the original creator know about your use.
    Be aware that there are a lot of websites that offer stock photography and other images for free (such as morguefile.com) or for very reasonable prices (such as iStockPhoto).

  • How do I see the tables in an existing business area and add tables to it

    Hi
    I am having a business area which contains a number of business folders.
    I am creating a new custom folder in it but i dont know if the table exists in the business area or not. How can I see the lisst of tables which are being used by the business area.

    Hi,
    Easiest way is to look at the folder properties using the administrator tool, you can see there the objects the folder is created on.
    Another way is to create a SQL to query your needs.
    You can find here in the forum several SQL regarding the connection between folders and BA.
    In the folders table you will be able to see the source of it.
    Of course that for custom folder you will need to see the SQL to get your requirment.
    Tamir

  • How do I take pictures that were texted to me and add them to my Gallery?

    I love my Nexus!

    Hello there.
    Open the text section.
    Click on the particular text from the person that sent it to you.
    Click and hold on the picture, you will then be given a "save attachment" option.
    The picture will then be saved under Gallery/Download.

  • Apple switched the last two digits of my number when replacing my iphone.

    My iPhone had problems charging, so I took it to the Apple Store to have it checked out. It wound up being replaced, but later on in the day I found the last 2 digits of my phone number have been flipped.
    Should I contact Sprint, or take it back to the Apple Store?
    Is there another fix I can try? Sprint still lists me at my old number.

    The phone number should be hard-coded into the SIM card.  Try powering off your phone, resetting the SIM card, and powering back on.

  • AD user script to populate the IPPHONE attribute with the last 4 digits of the Telephonenumber attribute

    Good Afternoon Scripting Guys. I have a script that I have been working with pretty much all day today and just cant quite get it to play nice. Our objective is to search AD for specific users (say filtering them out with a username that starts with a "T")
    and User account is "Enabled" then grab the last four digits of their phone number (phone number is set up as follows: (800) 123 456 ) then populate the IPPHONE attribute with the last four digits of their phone number. I have read a ton of online
    blogs with users successfully making this happen but it appears that they are all using Quest (as the commands are all Get-qaduser and Set-qaduser). I need something that runs strictly in native Active Directory Module PowerShell on a Windows Server 2008r2
    Domain Controller.  I am also trying to keep it as simple as possible by using a Get command, then piping a Set command.  I have saved the script into a .ps1 file with the logic as follows:
    $SelUsers = Get-ADUser -filter {(SamAccountName -like "t*")} -Properties ipphone,telephonenumber -searchbase "OU=Test Users,OU=Temporary Org,OU=Test_Domain Users,DC=mydomain,DC=com" | where {($_.enabled -eq $True)}
    foreach ($user in $SelUsers)
     {$user.ipphone = $user.telephonenumber(4,$User.telephonenumber.length-4)
     set-aduser -instance $user}
    What is happening is kind of funny, but aggravating at the same time.  When we run the script, it completes with no errors.  When I pull up the properties of a user in the OU, the IP Phone field is populated with the number 8.  If the User
    account did not have a telephone number, the IP Phone field is populated with a -4.  So, apparently, the script is somehow subtracting the "-4" from the number of all of the Telephone Number field's characters.  Basically 12-4 is 8. 
    If there is no telephone number, then 0-4 is -4.  I have run the Get-ADUser portion of the script independently so I know its getting the correct users.  I also know it is populating the IPPHONE attribute but not with the last 4 digits of the telephone
    number.  Can you guys help out and maybe get this to work correctly?  Also, can you add logic to it to the script to delete any value in the IPPHONE field first, then replace it with the last 4 digits of the telephone.
    Any help would be GREATLY appreciated!!!!!  Thanks Guys...
    Lee

    First thing I would do is modify your filtering. This will remove the unneeded piping to the Where-Object cmdlet and also allow us to only return users who already have something in the telephoneNumber field. It is possible this could return all of your
    users, but if you have service accounts, etc. that do not have a telephoneNumber then they will not be included in your results. It's just a little cleaner.
    $SelUsers = Get-ADUser -filter {(SamAccountName -like 't*' -and Enabled -eq $True -and TelephoneNumber -like '*')}
    I suspect you may have a made a mistake when you entered what your phone numbers looks like. I assume that you forgot a final digit. If this is correct, and you have a space in the phone number between the three digits and the final four then you can use
    the split method to grab the last four digits.
    Foreach ($User in $SelUsers) {
    $Number = $User.telephoneNumber.split(' ')[-1]
    Set-ADUser -Identity $User -Replace @{ipPhone=$Number}
    There's no reason to delete what's in the field first because that's part of what the -Replace parameter will do anyway. This should help get you started!

  • The hard disc of my laptop has crashed and i lost all the data. Now I want to take back up of my I phone and transfer contacts , messages and music back into my laptop , how can I do that. Pl help

    The hard disc of my laptop has crashed and i lost all the data. Now I want to take back up of my I phone and transfer contacts , messages and music etc back into my laptop , how can I do that. Also let me know how I can transfer the contacts into Windows contacts from I phone. Pl help

    Your content will only be where you put it.  It has always been very basic to always maintain a backup copy of your computer.
    You can transfer itunes purchases from your iphone: File>Device>Transfer purchases.
    You can import your pics taken with the iphone as you would with any digital camera.
    You can e-mail the other pics to yourself, they will never be of the original quality.
    You can out a unique contact and calendar entry on the computer.  You should get the option to merge the data when you sync.

  • TS3694 I was making the update for my iphone 4s . then he stops. My phone in this time is in the recovery mode and do not take the firmware to open my phone, please can u help me to recover my phone. My current  ios 6.0.1. plese send me some thing that is

    was making the update for my iphone 4s . then he stops. My phone in this time is in the recovery mode and do not take the firmware to open my phone, please can u help me to recover my phone. My current  ios 6.0.1. plese send me some thing that is useful

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • Apple Pay: The last 4 digits of my device account number is not showing up on my phone.

    My credit card company needs the last 4 digits of my device account number, and only ***** (stars) show up under my divice account number.  I have 8.1 installed, and have tried restarting my phone.  Any suggestions on how to get my divice account number to show?

    natapech wrote:
    It sounds like your bank requires additional authentication before you can use Apple Pay. It does not look like there was a token activated for your wallet. When you are in your Passbook app- does it say under the card that your card is activated and ready for Apple Pay? If it does not, contact your Bank to get DAN (token) activated.
    DAN will show once token is provisioned and activated, no need for transaction to occur first.
    Hope this helps.
    My credit card is obviously activated, as I was just able to use Apple Pay with it at a store (where they didn't ask for any DAN code). When I view the card in Passbook, it says nothing about whether it's been activated, one way or the other, but obviously the card is working for Apple Pay.
    But I just did find the DAN, way, way down at the very bottom of the Info page, below the whole list of recent transactions.
    Nowhere in any documentation I've seen does it indicate that this would be at the very bottom and one has to scroll so far down. Does seem like an unfriendly place to put it,

  • Smart phones compare last 7 digits only, recognize...

    Hi,
    I have a problem with my N70 and I believe it exists with other smart phones models as I've read in other forum. Not exists in my old Nokia 6230i nor other than nokia models.
    The problem is that new nokia phones recognize two different numbers as duplicate if the last 7 digits are the same. In Saudi Arabia the mobile numbers are 10 digits. So If I have in my contacts two different persons and both their mobile number ending with same 7 digits and one of them called me, the name will not appear. Instead, the number will appear. Also, in the call list (dialed, received, missed) the name will not appear. It's common to find two persons with same last 7 digits number. And some maybe request that (father and son, mother and daughter, husband and wife).
    Nokia smart phones having this problem long time ago. And many update released for many phones models, but, still having the same problem.
    Regards
    Fawwaz

    @ slay, if you want to tell something to Nokia use the 'contact us' button in the upper right hand side of this page. this is a user to user forum. Nokia will not hear you on these boards at least not in official capacity, nor will they respond to your plea...just keep that in mind.
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

Maybe you are looking for

  • Order of values passed to ODCIAggregateIterate

    I have implemented my own aggregate function that concatenates varchar2 values together. It works perfectly, however, the order of the aggregated data is inconsistent and does not match the order that it occurs in the table the aggregation is over (

  • SOAP messages not visible in RWB - Message Monitoring - Adapter Engine

    Hi, following scenario: ERP is sending IDocs to PI. Within PI an integration process sends the IDoc data through a SOAP (WS) receiver channel to a system far far away. In RWB -> Communication Channel Monitoring I can see all delivered messages select

  • JDeveloper masterclass in Australia starting ~2 weeks

    Hi gang, a little blatant self promotion for a JDeveloper workshop I'm running in conjunction with the Australian Oracle User Group and sponsored by OTN in 2008, that might be of interest to OC4J users in Australia. "Scared of JDeveloper because you

  • Can OS X Snow Leopard be installed on a MacBook Pro5, 5 with an Intel Core 2 Duo?

    This question may already exist somewhere in the support community, but if it is there I have missed it. If not, then here it is for myself and those of this specific inquiry. I have a MacBook Pro bought in mid-2009, Model MacBookPro5, 5, with an Int

  • Printable page

    I've in my application the next button: <contents> <button text="Imprimir pantalla" targetFrame="_blank" destination="${ctrl:eventUrl(uix, 'printMe')}" /> </contents> <handler> <event name="printMe"> <showFacet name="printable"/> </event> </handlers>