If I'm understanding you correctly, you have phone numbers listed in your users' properties sheets as:

(0)215-555-1212

And you need it to be formatted as

215-555-1212

?

How many users are we talking about?

If each phone number is formatted -the same way-, this is basic string manipulation that can be done relatively easily using a script.

If the phone number formatting is all over the map, IE, some are (0) 215-555-1212, some are 0-215-555-1212, some are (215) 5551212, it's going to be much easier to just create an Excel spreadsheet containing each user and their phone number and just manually reload them.

Either way, moving forward you'll need to either enforce this procedurally with whomever creates your user accounts, or else invest in some sort of account provisioning software that can enforce the formatting rules that you need.

0

Yann de ChamplainAssociateAuthor Commented: 2007-04-10

I am Business Project Manager. The people in charge of the AD are trying To Bul...t me saying that it is not possible. I know they're wrong. So I need to bring the solution to make them move.

We are talking of about 2500 user I would say. maybe more. As far as I know, we only need to remove "(0)" all the numbers seems to be in a clean format. So, I would not really need to user RegEx formlua. But the problem is the tool, util to perform this modification. This is a company with a lot of security rules and standards.

The following VBScript will take a single user account and modify its telephone number properties - I don't have a script handy that'll do precisely what you're looking for (query AD for all user objects and clean up the phone number), but let me know if you need it and I can put it together.

The following script assumes that you want to make this change for every single user in your domain. If you want to run it on a single OU as a test, just change the DN in the first line from "dc=company,dc=com" to something like "ou=TestOU,dc=company,dc=com"