Hoppa till innehåll

  • Logga in via Facebook Logga in via Twitter Logga in via Windows Live Log In with LinkedIn Log In with Google      Sign In   
  • Registrera dig nu!





Foto
- - - - -

Modelalias User Exit for Microsoft Deployment Toolkit 2010/2012

  Skriven av Mikael Nystrom , 01 May 2012 · 1207 visningar

nyström deployment mdt script
No, I did not create this script, I think this has been around for a long time, somewhere around 2007 and correct me if I’m wrong but I believe it was Ben Hunter that started this back in the days. I have then seen this at the Deployment Guys and various other TechNet sites I did some updates to it since I do a lot of OS deployment in virtual environments, VirtualBox, VMware, Xen and of course Hyper-V. In MDT 2012 they spot most of this with the following information but in some cases you need a bit ore, and you need to be able to modify it to
So Credit goes to Microsoft, Ben Hunter and “The Deployment Guys” (and I’m sure Michael Niehaus has been involved too, so credits for him as well)
Using the Modelalias User Exit script in the Virtual World

In MDT 2012 they have bumped up the information you get from the ZTIGather script, below is the most important information we get from it. But sometimes we need more, but before we get into that, check out the list below. Notice the two last Hyper-V examples, we have the same info returned but that is not the same version of the Hypervisor.
What do you get directly from MDT 2012 s virtualization information?

Here is the result you get during the inventory when running on a VMWare ESXI or VMware Workstation
  • Property IsHypervisorRunning is now = True
  • Property IsVM is now = True
  • Property VMPlatform is now = VMware
Here is the result you get during the inventory when running on a VirtualBox
  • Property IsHypervisorRunning is now = False
  • Property IsVM is now = True
  • Property VMPlatform is now = VirtualBox
Here is the result you get during the inventory when running on a Xen
  • Property IsHypervisorRunning is now = True
  • Property IsVM is now = True
  • Property VMPlatform is now = Xen
Here is the result you get during the inventory when running on Hyper-V (2008 R2)
  • Property IsHypervisorRunning is now = True
  • Property IsVM is now = True
  • Property VMPlatform is now = Hyper-V
Here is the result you get during the inventory when running on Hyper-V (2012 BETA)
  • Property IsHypervisorRunning is now = True
  • Property IsVM is now = True
  • Property VMPlatform is now = Hyper-V
There are more info that we will get in MDT around virtualization, here is the complete information around virtualization for a Hyper-V guest OS
  • Property IsHypervisorRunning is now = True
  • Property SupportsVT is now = False
  • Property SupportsNX is now = True
  • Property Supports64Bit is now = True
  • Property SupportsHyperVRole is now = False
  • Property VMHost is now = IBL04.tslab.net
  • Property VMName is now = TESTHV20
  • Property IsVM is now = True
  • Property VMPlatform is now = Hyper-V
As you can see we also get the hostname and VMname, but only if the IC’s are loaded and they are not loaded by default in WinPE, but a friend of mine banged his head against the keyboard for a while and here is the answer…
Is this ok?

This is mostly ok and fine, but sometimes I really need to know what version of Hyper-V (or other platform) it is and at the same time I would like to support and handle the different naming standards that all vendors has and translate it all to one new property called ModelAlias. Then I can use ModelAlias instead of Model, since I can tweak, twist and bend whatever the OEM’s try to do I can translate it to something that is easy to handle. ModealAlias has been one of the easy ways to deal with Lenovo’s interesting model naming. They use 4+3 digits as model, the first 4 is the real model and the rest is the “unique” build, like unique keyboards and such (things that matters outside the OS deployment world), but for me the same driver is going to be installed even if the keyboard is in Swedish…
If you look at the last example, you will see that we get the same result for Hyper-V in all releases, well that’s “ok”, but the issue is that If I need to install the Integration Components I need to know what version to install to be supported and optimized. So by using the ModelAlias userexit script in MDT (Works in both LiteTouch and in ZeroTouch) the script will examine the bios version (and other information if you need to) and determine the version. So if we take a peek into the script it looks like this for the Hyper-V part.
Postad bild
As you can see BIOS version VRTUAL – 3000919 will give me ModelAlias=Hyperv2008R2 and BIOS version VRTUAL – 9001114 will give me ModelAlias Hyper-V2012BETA
Using the Modelalias User Exit script in the Physical World

Here is another example on how to use this, I was deploying servers not long ago and I was using MDT 2010 LiteTouch. I handle drivers using %make%%model% in most cases but in this case that was kind of tricky. The reason, well IBM has some fancy characters in the model string (like -[]-), not really easy to use as a path. J
Postad bild
As you can see they have —[HS22]— as model name and after using the userexit script it will be converted into IBMHS22 and that is a bit easier to handle as part of a file path.
Here is one other example for a HP Compaq 8240. HP has a bunch of “different” 8240′s, but from my perspective it is just the same when it comes to drivers and apps, so we convert them into something more useful, like this
Postad bild
Here you can see the real model name being “HP Compaq nw8240 (PY442EA#AK8)” and after a translation it will be just “HP Compaq nw8240″ instead, easier to handle, easier to have as a path in MDT
How do you use the UserExit script?

This is the easy part, just download it, unpack it and save it in the scripts folder in MDT. Then you modify the customsettings.ini to use the script like this:
[Settings]
Priority=SetModelAlias, ModelAlias, Default
Properties= ModelAlias

[SetModelAlias]
UserExit=ModelAliasExit.vbs
ModelAlias=#SetModelAlias()#
[Hyper-V2008R2]
MandatoryApplications001=<GUIDNumberOFApplicationInLTI>
[Hyper-V2012BETA]
MandatoryApplications001=<GUIDNumberOFApplicationInLTI>
(If you are using SCCM you will the use Packages or Application name, but it works the same)
When you run ZTIGather.wsf you can see the result like this on a Windows Server 2012 BETA
Postad bild
You can download the ModelAlias.vbs script here
Here is some links to older versions of the script:
The Deployment Guys
Ben Hunters Blog
/mike
  http://feeds.wordpress.com/1.0/comments/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/delicious/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/facebook/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/twitter/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/stumble/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/digg/anothermike2.wordpress.com/523/ http://feeds.wordpress.com/1.0/reddit/anothermike2.wordpress.com/523/ http://stats.wordpre...ke2&ref=&feed=1

Source





Trackbacks för detta inlägg [ Trackback URL ]

Det finns inga Trackbacks för detta inlägg