![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to add 0 in the field telephone Number Hi all, I have to change about 3000 user account information (telephone number) adding the 0 at the start of the number... I need help to do it in automatic way... can someone help me??? please... |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to add 0 in the field telephone Number =?Utf-8?B?U2VyZ2lvIFNicmVubmE=?= wrote on 27 aug 2009 in microsoft.public.scripting.vbscript: Quote: > I have to change about 3000 user account information (telephone number) > adding the 0 at the start of the number... > > I need help to do it in automatic way... > > can someone help me??? telnumberString(i) = "0" & telnumberString(i) next -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to add 0 in the field telephone Number Sergio Sbrenna wrote: Quote: > Hi all, > > I have to change about 3000 user account information (telephone > number) adding the 0 at the start of the number... > > I need help to do it in automatic way... > > can someone help me??? > > please... I suppose you mean changing Active Directory users. If so, you can simply adapt this script from Microsoft: http://www.microsoft.com/technet/scr...nda/dec06/hey1 211.mspx Theoretically is enough to replace the lines: strTelephone = objUser.telephoneNumber objUser.Description = strTelephone with the line: objUser.telephoneNumber = "0" & objUser.telephoneNumber and should work (obviously you also need to change fabrikam.com with your AD domain). Massimo. -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to add 0 in the field telephone Number "MassimoP" <nospam@xxxxxx> wrote in message news:uYbmfdvJKHA.1488@xxxxxx Quote: > Sergio Sbrenna wrote: > Quote: >> Hi all, >> >> I have to change about 3000 user account information (telephone >> number) adding the 0 at the start of the number... >> >> I need help to do it in automatic way... >> >> can someone help me??? >> >> please... > Hi Sergio, > > I suppose you mean changing Active Directory users. > If so, you can simply adapt this script from Microsoft: > http://www.microsoft.com/technet/scr...nda/dec06/hey1 > 211.mspx > > Theoretically is enough to replace the lines: > > strTelephone = objUser.telephoneNumber > objUser.Description = strTelephone > > with the line: > > objUser.telephoneNumber = "0" & objUser.telephoneNumber > > and should work (obviously you also need to change > fabrikam.com with your AD domain). > > Massimo. > > -- > telephoneNumber attribute is not blank. For example: ======== Do Until objRecordSet.EOF strUserPath = objRecordSet.Fields("AdsPath").Value Set objUser = GetObject(strUserPath) strTelephone = objUser.telephoneNumber If (strTelephone <> "") Then objUser.Description = "0" & strTelephone objUser.SetInfo End If objRecordSet.MoveNext Loop -------- And, to get picky, you could modify the query to only return users where telephoneNumber is not missing. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Maximum number of recipients in BCC field | VB Script | |||
| Microsoft telephone number | Vista mail | |||
| Recording from Telephone to CD Help | Vista hardware & devices | |||
| What is the telephone number to call to check order status? | Vista General | |||