How to set up random Computer Name?

O

OttawaTrade

I made an image file and distributed to identical machines in a network and
use in virtual machinese. Everything is fine except computer name. Since he
IP address is gotten from the DHCP server, there is no conflicts, but every
computer has the same computer name, thus it is a total mass. I can not
change the name manually, because everything is automatic run.

Is there a way to name the computer based on its MAC address or make it
random?
 
G

Guest

Displays SMBIOS information and changes/displays the computer name.

----------------------------------------------------------------------------
Compname v0.4 Copyright Oli Restorick ([email protected]), 2002.
This is beta software. Use at your own risk.
Uses Mitec SysInfo by Michal Mutl (www.mitec.d2.cz).
----------------------------------------------------------------------------

COMPNAME [/c name | /d [template] | /s]

/c[hange] Changes the computer name to the one specified.
/d[isplay] Displays the computer name.
/s[mbios] Displays the serial number information from SMBIOS.
name New computer name. Only valid with the /c option.
This may contain macros; see below.
template When used in conjuction with /d, displays the evaluated name.
Templates will normally contain macros; see below.

The following macros are valid in the name or template.
?s = System serial number. ?c = Chassis serial number.
?b = Mainboard serial number.
?a = The first populated number from system, chassis and mainboard numbers.
?u = System UUID ?U = Fake UUID (24 zeros plus MAC).
?G = If System UUID is FFFF... or 0000... or null it uses ?U, otherwise ?u.
?i, ?j, ?k, ?l = 1st, 2nd, 3rd, 4th octets of IP (decimal).
?I, ?J, ?K, ?L = 1st, 2nd, 3rd, 4th octets of IP (hex).
?m = First MAC address. ?e = Existing NetBIOS computer name.
?D = day ?M = month ?Y = year
?1, ?2, ?3, ..., ?0 = 1, 2, 3, ..., 10 random alphanumeric characters.

Examples:
COMPNAME /d Displays the NetBIOS computer name.
COMPNAME /d ?s Displays the system serial number.
COMPNAME /s Displays system summary information.
COMPNAME /c jupiter Changes computer name to "jupiter".
COMPNAME /c acme-?s Changes computer name to "acme-ABCDEF" where
ABCDEF is the system serial number.
Notes:
* You can simply replace a /c switch with a /d switch to check the name.
* If the name (after macro expansion) is longer than 15 characters,
then the NetBIOS name will be truncated, but the DNS name (on Windows
2000 and above) will be the full length. This may break some applications.
* The following characters (and spaces) are invalid an removed automatically:
\ * + = | : ; " ? < > ,
* The _ character gets translated to - to avoid DNS name problems.
This program does not rename the computer's domain account.

You can download the program from www.willowhayes.co.uk/download/compname.exe.

My current methodology is to let Windows autogenerate a machine name, using
the entries below, and then to call compname.exe from a cmdlines.txt file
placed in the $OEM$ folder.

[UserData]
ComputerName=*

[Identification]
JoinWorkgroup=workgroup

Lines from cmdlines.txt get executed at the end of GUI Mode setup (during
the “registering components†phase).

After a reboot, the new machine name is set. The netdom.exe utility from
the Windows 2000 Resource Kit can be used to join the domain automatically.
 
P

Phillip Windell

I am assuming this involves VirtualPC or Virtual Server.
When you create a new Virtual Machine from a previous Virtual Harddrive
(*.vhd)you need to:

1. Unjoin it from any domains before you make copies of the file

2. Rename the "new machine" first thing as soon as it is started up while
other "copies" are not running to avoid a conflict.

3. Create a bootable floppy (or floppy image) that contains a utility to
change the machine SID. GhostWalker that comes with Symantec Ghost is one
example, Microsoft's SysPrep is another although I have never used it and
can't help you with it.. Just changing the machine name isn't enough,..the
SID needs changed too.

4. After the name and the SID are fixed, join it to a Domain if that was the
intension.

5. Never reuse a *.vmc file. Reuse only the *.vhd file. You need to create
a "fresh *.vmc file everytime so that the Nics don't end up with the same
MAC Address. You could alter the *.vmc file to fix it,..but it is easier to
avoid it and create a fresh one in the first place.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
-----------------------------------------------------
Understanding the ISA 2004 Access Rule Processing
http://www.isaserver.org/articles/ISA2004_AccessRules.html

Microsoft Internet Security & Acceleration Server: Guidance
http://www.microsoft.com/isaserver/techinfo/Guidance/2004.asp
http://www.microsoft.com/isaserver/techinfo/Guidance/2000.asp

Microsoft Internet Security & Acceleration Server: Partners
http://www.microsoft.com/isaserver/partners/default.asp

Deployment Guidelines for ISA Server 2004 Enterprise Edition
http://www.microsoft.com/technet/prodtechnol/isa/2004/deploy/dgisaserver.mspx
 
R

Richard G. Harper

This is what SYSPREP is for, grasshopper. Before you make an image you run
SYSPREP on it and each machine, when rolled out, will either prompt you for
a name or you can accept a randomly-generated name (why you'd want to is
beyond me, but the option is there) or you can script the naming of
computers with the Sysprep utilities. I would highly recommend you hie
yourself to the MSDN or TechNet web sites and research SYSPREP - then
prepare to roll out the whole network again.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top