Dears, i'm trying to rename the computers during the OSD process to it's MAC addresses. i want to do it by SCCM only without MDT integration because we have SCCM SP1 and MDT 2012 and we're tending to deploy Windows 8.1. and we're alredy deploying Windows 8.1 with no issues. i'm using the following script:
Set env = CreateObject("Microsoft.SMS.TSEnvironment")
Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery("SELECT MACAddress FROM Win32_NetworkAdapterConfiguration " & "WHERE IPEnabled=true" )
ProgressUI.CloseProgressDialog
For Each IPConfig In IPConfigSet
env("OSDComputerName") = Left(Replace(IPConfig.MACAddress,":",""),12)
WScript.Echo env("OSDComputername")
Next
and i'm using it in a package after apply operating system step as shown in the following snapshot:
however the machine get named Minintxxxx and the step gives code 0 as a return code which means successfully completed.
any help please?