Announcement

Collapse
No announcement yet.

Update User accounts

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

  • Update User accounts

    Hi,

    I need to add phone numbers to all of our users in AD but am not sure the best way to do it.

    Can anybody give me any pointers? I've got the numbers in a spreadsheet with the corresponding usernames.

    I've used CSVDE before but only for simple export and import of users and not for updating user accounts. Would the best way to be export user accounts via CSVDE into Excel, add the numbers and then import back in?

    Any help would be greatly appreciated.

    Matt

  • #2
    Re: Update User accounts

    Try importing user accounts using this combination of commands:

    Code:
    dsquery user -limit 10000 | dsget user -dn -fn -ln -display -samid  -hmdir -hmdrv -loscr -acctexpires -email -tel > C:\getalluse.txt
    Add or delete parameters after dsget user as required (Concentrate on -dn as this will be the basis from where you will create the batch file later on!).
    For more info for each command try Dsquery user /? and DSget user /? from the command prompt.
    Then export data into excel, match it with the current data you hold, and then try to convert it to the other command Dsmod user check Dsmod user /? for more options.
    Add the -tel parameter populated with data you already have.

    Create a batch file with one line initially to test it and if it works create a batch file with the whole data and run it.

    Hope it helps

    *** The advise above is based on a method I successfully used myself but is not very thorough and is jumping a few steps. You can use it as a reference point together with finding out more about DS commands***
    Last edited by L4ndy; 9th July 2008, 18:20.
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: Update User accounts

      thanks for this! Worked like a charm!

      Matt

      Comment

      Working...
      X