Jump to content


mburke78

How to name devices from the BIOS asset tag

Recommended Posts

Hi I am deploying a Windows 7 x64 image and am starting from scratch. I want a way to read the asset tag in the BIOS and use that as the PC name. Also I want to be able to append FGD- or FGL- to the asset tag depending on if it's a Desktop or Laptop. What is the best way of doing this in the task sequence. Any help much appreciated.

Share this post


Link to post
Share on other sites

Sorry it's 2012 SP1 version 5.0.7804.1300. We do have MDT integrated but am trying to stick to not using it if at all possible but am not sure if that will work as I am right in thinking that MDT adds a lot of functionality on top of the integrated SCCM Task Sequence?

Share this post


Link to post
Share on other sites

We use sccm with mdt integration inconjunction with a script named "machinenameexit.vbs". Google it for full instructions on how it works.

 

You could also just add a variable for computername (i think its OSDComputerName or something) and the value would be "FGD-%serialnumber%". I remember doing something along those lines in my test lab.

  • Like 1

Share this post


Link to post
Share on other sites

We use sccm with mdt integration inconjunction with a script named "machinenameexit.vbs". Google it for full instructions on how it works.

 

You could also just add a variable for computername (i think its OSDComputerName or something) and the value would be "FGD-%serialnumber%". I remember doing something along those lines in my test lab.

 

Thanks for the reply. I thought that would be the case that I had to use MDT as well to do some of the trickier parts. I will have a look into your suggestion. Thanks.

Share this post


Link to post
Share on other sites

Hi there,

 

well I'm not a good script-kid, but we use an OSD script that asks the admin to enter a computername at step X of our TS. The asset tag might be stored somewhere in wmic so that you're able to query it.

Sth like wmic bios get serialnumber ?

You could echo the output somewhere in a txt or csv file by adding >> X:\output.txt

Then use a powershell script that uses the line with the serial number as the computername or a part of the computername if u've more characters to add.

I'm sure you can combine both things to a useful script if you're talented in powershell :)

  • Like 1

Share this post


Link to post
Share on other sites

Why not just letting MDT do it's magic. It's pretty simple once you got the hang of it and you don't need much programming skills.

Just run a gather step with this customsettings.ini and you got what you want. The stuff under default is just examplary for customizations you can apply.

[Settings]
Priority=Desktop, Laptop, Server, VM, Default

[Default]
UserLocale=de-DE
UILanguage=en-US
KeyboardLocale=(0407:00000407)
TimeZoneName=Central Europe Standard Time
OSDComputername=#Left("%SerialNumber%",15)#

[Desktop]
Subsection=Desktop-%IsDesktop%

[Laptop]
Subsection=Laptop-%IsLaptop%

[Server]
Subsection=Server-%IsServer%

[VM]
Subsection=VM-%IsVM%

[Desktop-True]
OSDComputername=FGD-#Left(Replace("%SerialNumber%"," ",""),11)#

[Laptop-True]
OSDComputername=FGL-#Left(Replace("%SerialNumber%"," ",""),11)#

[Server-True]
OSDComputername=FGS-#Left(Replace("%SerialNumber%"," ",""),11)#

[VM-True]
OSDComputername=FGV-#Left(Replace("%SerialNumber%"," ",""),11)#

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.