Lightjm Posted June 19, 2014 Report post Posted June 19, 2014 I am moving from WDS to SCCM 2012 for OSD. I have the image ready and deploys very nicely. The one thing that we need to do is, change the computer name based on the serial number. We set all of our names with the asset tag in the name. We have a DB that we scan all Serials, Asset Tags, Computer Name in. For example: Asset Tag: XXXXX Serial Number: 123456 Would have a computer name: LC0D401TO1XXXXX When using WDS we did this after the OS was installed using a bat file (code below). Now when doing this in SCCM 2012, the name either will not change or the computer will be deleted from the domain. Any help would be great!! set newMN= cscript.exe \\file_Location\inventory-sn.vbs //nologo %computername%>c:\install\machsn.txt FOR /f %%p IN (c:\install\machsn.txt) DO SET machisn=%%p find /c /i ",%machisn%," \\file_location\MNs.txt FOR /f "tokens=1,2,3 delims=," %%q in ('findstr /s %machisn% \\File_Location\MNs.txt') DO SET newMN=%%s SET MACHNAME=%newMN% NETDOM RENAMECOMPUTER %newMN% /NewName:%MACHNAME% /userD:domain\user /PasswordD:**** /FORCE Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted June 19, 2014 Report post Posted June 19, 2014 In ConfigMgr you have to start using task sequence variables. In this case your script has to create and set the OSDComputerName variable to your computer name, 1 Quote Share this post Link to post Share on other sites More sharing options...
Lightjm Posted June 24, 2014 Report post Posted June 24, 2014 In ConfigMgr you have to start using task sequence variables. In this case your script has to create and set the OSDComputerName variable to your computer name, Thank You so much for your help! I will check this out and let you know how it goes... Quote Share this post Link to post Share on other sites More sharing options...