VBScript to name computers during OSD

Determining a computer name during an imaging process has always proved to be a challenge. One of my favorite methods is to utilize WMI to obtain the serial number of the computer that is being imaged. This way, if all your hardware is from a particular vendor, Dell, HP, Panasonic, you can guarantee that no two computer names will ever be the same and you can name them automatically during the imaging process. Not to mention you can quickly look up the computer information on the vendor website.

The following vbscript I wrote will determine the serial number, append a “C” to the front of it, then populate the OSD task sequence variable called “OSDComputerName”. It is one of the first tasks in all my task sequences. One of the extras I wrote in will actually prompt you to enter the computer name if it detects it is a VMware, Citrix or Microsoft Virtual machine, because they do not have a serial number in WMI. Enjoy!

GetComputerName.txt

Just rename to .vbs

Advertisements
Posted in OSD, SCCM, VB Script
One comment on “VBScript to name computers during OSD
  1. Maximo says:

    Hi, I do think this is an excellent web site. I stumbledupon it 😉 I may
    revisit once again since I saved as a favorite it. Money and freedom is
    the greatest way to change, may you be rich and continue to guide other
    people.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Papers
People
Map

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 31 other followers

%d bloggers like this: