i am running the following script to pull the machine name from the SMBIOS for the ZTI deployment of windows 7.
the problem i have it works fine for any DELL PC we have but not on our Viglen Range.
if you run the script on a built Viglen PC it comes back with the relevant information. so i know my script is running OK.
i have added this to run as a package in my MDT Task Sequence within Config Manager at the beginning of the post install phase just before the Gather Process.
has anyone else had any problems auto pulling the machine name on a viglen into SCCM.
i have tried numerous things but it is being a pain in the arse.
any help would be greatly received.
cheers
Matt
here is the vbscript I'm running
dim env
strNewName = ""
strManName = ""
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystemProduct")
For Each objSMBIOS in colSMBIOS
strManName = objSMBIOS.Vendor
Next
If strManName = "Dell Inc." then
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
strNewName = objSMBIOS.SerialNumber
Next
ElseIf strManName = "Viglen" then
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
strNewName = objSMBIOS.SMBIOSAssetTag
Next
ElseIf strManName = "TOSHIBA" then
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_BIOS")
For Each objSMBIOS in colSMBIOS
strNewName = objSMBIOS.SerialNumber
Next
End if
SET env = CreateObject("Microsoft.SMS.TSEnvironment")
env("OSDComputerName") = strNewName
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.
hi all,
i am running the following script to pull the machine name from the SMBIOS for the ZTI deployment of windows 7.
the problem i have it works fine for any DELL PC we have but not on our Viglen Range.
if you run the script on a built Viglen PC it comes back with the relevant information. so i know my script is running OK.
i have added this to run as a package in my MDT Task Sequence within Config Manager at the beginning of the post install phase just before the Gather Process.
has anyone else had any problems auto pulling the machine name on a viglen into SCCM.
i have tried numerous things but it is being a pain in the arse.
any help would be greatly received.
cheers
Matt
here is the vbscript I'm running
Share this post
Link to post
Share on other sites