Customer requirement
In the task sequence, set the computer name to match the service tag
Solution
Easy - use the OSDComputerName variable with a value of %SerialNumber% (or was it that easy?)
Problem Statement
How does the %SerialNumber% value get populated in this case? This is straightforward if I'm using MDT integration as I can use the Gather step. However, the customer does not have MDT integrated and this would take a few weeks to organize with a strict change request procedure.
So what do I do?
Solution (revised)
Do I actually need MDT integrated or do I just need some MDT files?
I had a word with @ncbrady from @WindowsNoob and we came up with a plan. I installed MDT on a laptop and created a deployment share.
I figured that these files were all that I needed - only 45MB. I copied the files to my content source location and created an MDT Gather package (with no program).
Then I configured the TS as shown in the screenshots.
First I ran ZTIGather.wsf with this command
Cmd.exe /c cscript.exe .\Scripts\ZTIGather.wsf /debug:TRUE
This was to "discover" the service tag.
The next step was to set the hostname to match the serial number (service tag).
Unfortunately the task sequence failed:
"Gathering complete, but no INI file found” with an error code of 0x00001F40
[Settings]
Priority=Default
Properties=MyCustomProperty
[Default]
OSInstall=Y
SkipCapture=YES
SkipAdminPassword=NO
SkipProductKey=YES
That did it - SUCCESS. Thanks for the assistance Niall.
Until next time.......
Edit #1:
Jörgen Nilsson has contacted me to say that only a few of the MDT files are actually required (less than 800KB). Here they are:
Thanks Jörgen.
Jörgen Nilsson has contacted me to say that only a few of the MDT files are actually required (less than 800KB). Here they are:
Thanks Jörgen.
Edit #2:
I've had some feedback about other ways to set the computer name to the service tag without using MDT. Thanks for that. However, the whole point of this post was to show how you can achieve MDT functionality without actually integrating MDT with ConfigMgr.
After all, the title is "Use MDT without using MDT".
very nice and creative way to do perform this task without use of MDT.
ReplyDeleteNeed is mother of ivention :)
Thanks Danish
DeleteGreat post Gerry.
ReplyDeleteThanks Todd. Appreciate it.
DeleteHi Gerry , you could also achieve this with PS. Something i mentioned here http://apppackagetips.blogspot.co.uk/2016/04/sccm-osd-name-pc-simple-powershell.html
ReplyDelete$Serial = Get-WmiObject -Query 'select IdentifyingNumber from Win32_ComputerSystemProduct' -Namespace 'Root\cimv2'
$Model = Get-WmiObject -Query 'select Name from Win32_ComputerSystemProduct' -Namespace 'Root\cimv2'
$SerialNo = $Serial.IdentifyingNumber.SubString(3)
$TS = New-Object -ComObject "Microsoft.SMS.TSEnvironment"
$TS.Value("OSDComputername") = 'LOC-' + $SerialNo
## Example Locatio would be LOC-54477X4
$TS.Value("XModel") = $Model.Name
Muchos Gracias for your post.Much thanks again
ReplyDelete