How to set the Computer Name to a the Serial Number during OSD SCCM 2012 SP1.
Osdcomputername Mdt As Computername Serial Number IsHello, Its 11:30pm on a Thursday, I was falling asleep but I shot out of bed in the realization that I have wanted to post this for a while now, so I just got up and did it Scenario Lets assume you have a bunch of PCs and you want to come up with a naming solution to automatically re-name them as part of the OSD, the serial number is a good idea and its almost guaranteed to be unique, right Correct.
Osdcomputername Mdt As Computername Serial Number During OSDNow some people will advise that you run a script or use WSNAME amongst other solutions, and these solutions do work, but I have recommend this much simpler solution instead for SCCM 2012 SP1. My client had a requirement that the companys acronym formed the formed the first part of the PC name, followed by a number. For example, AAAA1234 Now I will assume that you have SCCM 2012 SP1 installed with MDT and you have configured Config Manager integration, if you dont fear not, I have document the entire process here ( ) This is how its done First we need to edit the task sequence, so you need to add 3steps the first is the Use MDT Package step just after your Apply OS step The next step is Gather and ensure you set it to Gather only local data (do not process rules) The third step is the Set Computer Name step this is done by adding a Set Task Sequence Variable this can done by clicking Add from the menu above your task sequence and looking for the Set Task Sequence Variable option. Make sure you have the following in place as shown below, you will need the sequence variable to set to OSDComputerName. The value can then be set to SERIALNUMBER Once saved you can then alter this slightly to AAAASERIALNUMBER this will then change the Computer Name to AAAA123456 if 123456 was the serial number. One last important note please make sure you test this before mass roll out, and also that you make 100 sure that you have added these steps after Apply OS and before the Apply Windows Settings step. ![]() ![]() Press question mark to learn the rest of the keyboard shortcuts Log In Sign Up User account menu 1 MDT Deployment: OSDComputerName using MAC Limiting Characters. OSDComputerNamePVM-REPLACE(MACADDRESS,:,) OSDComputerNameRight(SerialNumber,9) Ideally, Id like to have a computer name that is PVM-(last 10 digits of MAC address) is that achievable in just the customsettings.ini file Or is it something that should be scripted 3 comments share save hide report 99 Upvoted This thread is archived New comments cannot be posted and votes cannot be cast Sort by best. Youve got the right idea already, but you have to smash all that logic into a single-liner. As far as I know, once that variable is written, it cant be written to again. So youre going to want to do something like: OSDComputerNamePVM-Right(Replace(MACAddress,:,),10). It seems to name the computer PVM-Right(Replace(mac address,:,),10). ![]() I tried mashing the to up myself but figured maybe there was a limitation to how many arguments could be used. I may just go with PVMmacaddress given that would meet the 15-char max. Although if you have another string to try I will throw it in to the customsettings.ini Continue this thread View Entire Discussion (3 Comments) More posts from the sysadmin community Continue browsing in rsysadmin rsysadmin A reddit dedicated to the profession of Computer System Administration. Members 2.4k Online Created Oct 22, 2008 Join Discover old memes help Reddit App Reddit coins Reddit premium Reddit gifts about careers press advertise blog Terms Content policy Privacy policy Mod policy Reddit Inc 2020.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |