Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2015
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatically naming computers

    Here is my issue

    Serial# Computer Name in the Name.csv
    12345 54321
    678910 109876
    OK what I need if possible is after the computer is imaged it finds what serial # the computer has (say its 678910) and look in the
    Name.csv file for 678910 and finds it name to be 109876 and names it that hopefully that explains it.
    Thanks for you replies and help with this issue

  2. #2
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts
    Hello, Barry, and welcome to Windows Secrets!

    As it stands you have given insufficient information.
    From where is the 'serial number' obtained following the image restore? This is not usually available to a computer program, since it is either on a sticky label on the outside of the case, or fairly inaccessible in the BIOS.

    Given the file in text format, it would be possible to run a BATch file which did this table lookup and used NETDOM or WMIC or even a Registry edit to change the computer name.
    I understand that it is even possible to use PowerShell to achieve this result!

    Personally, I would have said that it was fairly straightforward, and possibly involved less effort, to do the usual Start -> Control Panel -> System -> Computer name, domain, and workgroup settings -> Change settings button...
    Work of less than a minute each time, and you wouldn't need to copy files around and work out how to run them as Administrator.
    BATcher

    Time prevents everything happening all at once...

  3. #3
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 985 Times in 915 Posts
    When I create sysprep images the last step is to edit the unattend.xml and add the computer name. This can be done automatically if the name can be extracted from the BIOS, or manually if not. Manual is always less good because people make typos.
    The other thing you have to watch is if you allow the computer to create the name in AD, the name has to be in the correct AD location and also not already exist.

    cheers, Paul

  4. #4
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 985 Times in 915 Posts
    The other possibility is to have the CSV on the boot disk during machine image and use "find" to locate the name from the serial number, but again, this requires the ability to extract the serial number from the machine or type it in manually.

    cheers, Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •