Announcement

Collapse
No announcement yet.

Formatting Phone Numbers in AD

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formatting Phone Numbers in AD

    Hi.

    Within our Active Directory, the users have their phone numbers entered in a variety of formats. For example

    0112 223 2233
    01122232233
    +441122232233
    (0112)223 2233

    etc etc

    Is their a way I can quickly format all the numbers without going through each users attributes one at a time? We have hundreds of users so that will take ages! Ideally, I would like them in the format

    +44 (0)121 223 2233


    Any help gratefully received.

  • #2
    Re: Formatting Phone Numbers in AD

    There may well be other ways, but how about a CSVDE export and some Excel macro magic to format them, then an import back into AD?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Formatting Phone Numbers in AD

      I did try this but I've read that CSVDE is for new AD entries only when importing - you can't update existing entries.

      Comment


      • #4
        Re: Formatting Phone Numbers in AD

        You can do the export/format as described, but the import of the new format phone info would best be done via VBscript. There are literally thousands of script examples available thru Google, it just requires a bit of reading and trial and error.

        I don't pretend to be a scripting magician, but I have managed some tricks I never thought possible, doing this sort of thing.

        Your script should:
        A) open a link to AD
        B) open the spreadsheet with the new format phone info
        C) read the first username from AD, and search the spreadsheet for that name
        D) read the new phone # for that name
        E) copy that phone # to the user's AD property field (can't recall the prop name)
        F) move to the next name in AD.
        *RicklesP*
        MSCA (2003/XP), Security+, CCNA

        ** Remember: credit where credit is due, and reputation points as appropriate **

        Comment

        Working...
        X