An updated article with a new script found here!
I’m currently setting up a Deployment solution based on System Center Configuration Manager 2012 intregrated with MDT 2012. The idea was to set up a User Driven Installation (UDI) so the IT department would have to do as little as possible during the installation process.
Users would supply their corporate information during the initial steps of the installation and everything else would be taken care of.
Part of this solution was to manage the clients names, we decided to use the serial number as an identifier.
Primarily because it made sense to use the same identifier for all systems (HP/Dell use serial number not “LAPTOP00212”).
It’s a rather simple script which selects the last 10 characters of the serial number and remove the dashes.
Without this correction (shortening and removing special characters) the installation with halt on virtual machines due to the generated serial numbers (very long)..
SetComputerName.vbs
Set env = CreateObject("Microsoft.SMS.TSEnvironment") Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48) For Each objItem in colItems env("OSDComputerName") = Right(Replace(objItem.SerialNumber,"-",""),10) next
Save the script in your MDT package under the Scripts-folder:
Update the DP’s and head over to your Task Sequence.
Scroll down to PostInstall and under Gather add a Run Command Line-step.
In the Command line box type:
cscript.exe "%deployroot%\scripts\SetComputerName.vbs"
Deploy and ENJOY! :)
Cool blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple adjustements would really make my blog jump out. Please let me know where you got your design. Kudos
Hi Andrea,
I downloaded the base of this theme from the repository but it is greatly customized/improved.
Browsed through your site and I agree it could use some minor adjustments, it's poorly compressed and optimized which slows down the browsing experience and it has some fundamental flaws when it comes to security.
Send me a message through the contact-page and I'll get back to you with more information on how fix it.