The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • about.me

    about.me/mikaelnystrom

  • Archives

  • Meta

Archive for the ‘Drivers’ Category

Nice to Know – The hidden location for all HP servers drivers

Posted by Mikael Nystrom on November 9, 2016

The latest version of HP support pack was released recently, 2016.10.0 and we downloaded it to deploy it as usual, but Jorgen Brandelius at TrueSec could not resist the need of poking around on the media, and there is was, the hidden folder!!!

image
the magic folder.

What’s in the folder?

In the folder you will find the following structure, it is basically all drivers for Windows Server 2016 (and older supported OS as well) for all supported HP servers, it also includes agents for NANO server running on HP ProLiant.

image

What now?

Download, import and smile while you are deploying the HP server.

image

/mike

Posted in Deployment, Drivers, HP | Tagged: , , , , | 6 Comments »

PowerShell is King – Export drivers from Windows

Posted by Mikael Nystrom on February 26, 2016

During the OSD Deployment class this week we talked about drivers, one question was “is it possible to cheat?” and the answer is “Yes”

If you have a Windows 8.1/Windows Server 2012 R2 (or later) you can take the new PC, boot it and extract the drivers using PowerShell and then import them in MDT, ConfigMgr to deploy them, or use PNPUtil.exe to inject them.

How to export drivers

Export-WindowsDriver -Destination "C:\Drivers\$((Get-WmiObject -Class win32_computersystem).Model)" -Online

This command will create the folder c:\Drivers\”ModelName” and export all drivers from the running OS into that folder, like this:

image

Should I remove anything before import?

Yes, usually you don’t want the printer drivers, so you can remove the folders that starts with prn…. Those are printer drivers, like OneNote and similar…

What about import?

If you need to import them you can either use forfiles.exe plus pnputil.exe

https://deploymentbunny.com/2011/05/07/adding-drivers-using-pnputil-and-forfiles/

or you can of course use PowerShell…

$infs = Get-ChildItem -Path "C:\Drivers\$((Get-WmiObject -Class win32_computersystem).Model)" -Filter "*.inf" -Recurse -File
foreach($inf in $infs){
    $inf.FullName
    pnputil.exe -i -a ""$inf.FullName""
}

 

image

/mike

Posted in Drivers, PowerShell | Tagged: , | 8 Comments »

OSD Deployment – Deploying Intel NUC and getting drivers and settings assigned using the AliasUserExit.vbs – Converting Product into %ModelAlias%

Posted by Mikael Nystrom on November 24, 2015

I have been deploying the small and cool Intel NUC’s for a long time, they just have one problem, it is a small problem, but….

There is no Make/Model, actually, the entire SMBBios is empty, now that makes it a bit hard to figure what model we are deploying and therefore it is hard to determine what drivers that needs to be deployed. On some older  NUC’s there could be settings.

This is what we get from PowerShell – Win32_ComputerSystem,Win32_ComputerSystemProduct,Win32_BIOS and Win32_BaseBoard

image

As you can see Make and Model are kind of “nothing”, but SMBIOSBIOSVersion is RYBDWi35.86A.0350.2015.0812.1722 and that is basically the name of the motherboard, but slightly better, why don’t we use the Win32_BaseBoard and grab product, that seems just to be the perfect match here. And hold it… Win32_BaseBoard is already inventoried by the ZTIGather process, so the only thing we need to do is to set ModelAlias to Product, that seems pretty easy…

The “old” AliasUserExit to the rescue (once more)

The AliasUserExit script runs as a part of the ZTIGather process in MDT/ConfigMgr. This script has a section for Models where either Make is “Intel” or “”, in that case we grab the Product from the gather process and store that in %ModelAlias%.

Script can be found here: http://1drv.ms/1OdlmnW and inside the VBscript it explains how to use it

Verify that it works:

Running cscript ZTIGather.wsf /inifile:Customsettings.ini we get this on a DN2820FYK.
Note: In this case someone manually added/modified the SMBios using the Intel Toolkit to say that the Model is DN2820FYKH, but it is actually DN2820FYK
image
Running cscript ZTIGather.wsf /inifile:Customsettings.ini we get this on a NUC5i7RYB.
Note: In this case the BIOS is “normal”, that is it is totally blank
image
Running cscript ZTIGather.wsf /inifile:Customsettings.ini we get this on a D53427RKE.
Note: In this case the BIOS does contain vales, older NUC’s could have them set..
image

Posted in ConfigMgr, Drivers, MDT, OS Deployment, OSD, RealWorld | Tagged: , , , , , | 10 Comments »

Nice to Know–Deploying Windows Server Technical Preview on HP Proliant Microserver Gen 8

Posted by Mikael Nystrom on October 11, 2014

I use the HP Microserver Gen 8’s at home, since they are quiet and act as a full-grown server with full iLO support, dual network adapters and then some. I can basically do all kinds of testing with new operating systems and system center management platforms without upsetting my family to much and that is very practical.

During the deployment of Windows Server Technical Preview everything worked as expected. After the installation I added the Hyper-V role to start testing to deploy VM’s. I booted up the MDT Boot image, selected the Task Sequence and the install was working great, but hey, the network performance???

According to ImageX it will take 45 minutes to lay down the image! That cannot be correct, there is something wrong here. That kind of slow performance over the network just have to be an issue.. and it is…

You need to update the network driver for the built-in network adapters in HP Proliant Microserver Gen 8.

The built in driver is a Broadcom Nextreme driver and that does not work correctly with Hyper-V

Download the HP Ethernet 1 GB 2-port 332i Adapter driver from HP and install that instead, the 45 minutes is now just 5 minutes…

image

image

Happy Deployment.
/mike

Posted in Drivers, HP, Hyper-V, Windows Server vNext | Tagged: , , , | 2 Comments »

Back to Basic–Where to find Drivers for Servers and Clients

Posted by Mikael Nystrom on July 8, 2014

During one of the sessions today (at the Geek Week in Redmond) we talked about drivers and where to find them. This is absolutely nothing “new” or amazing, its more of a “note to attendees” kind of post.

HP Clients

The HP SoftPaq Download Manager from HP. The tools has the ability to download drivers for every business model that is supported into a repository, which you can then export drivers from. It also provides .CVA files that gives you instructions on how to silently execute drivers and tools that needs to be installed as an application. HP also provides .CAB files for some newer models. http://www8.hp.com/us/en/ads/clientmanagement/drivers-bios.html

image

Dell Clients

Dell have a really great webpage with ready made .CAB files, ready for download. It also includes Windows PE drivers, be sure to pick the correct version. A general rule is to NOT add any Windows PE driver unless you really NEED them, in other words. If you get any IP address and you can see the disk using diskpart, you don’t NEED any drivers. http://en.community.dell.com/techcenter/enterprise-client/w/wiki/2065.dell-driver-cab-files-for-enterprise-client-os-deployment.aspx

image

Lenovo Clients

For Lenovo a nice tool is the ThinkVantage Update Retriever. The tool is pretty straightforward, just create a repository folder, download all the drivers for your models. The most important thing here is that you should not grab the drivers from that folder, instead you should use the to tool to export them. http://support.lenovo.com/en_US/detail.page?LegacyDocID=TVAN-ADMIN

(For fun, search for it and you will ALWAYS find at least one dog… http://www.bing.com/images/search?q=ThinkVantage+Update+Retriever&qs=n&form=QBIR&pq=thinkvantage+update+retriever&sc=5-29&sp=-1&sk=)

image

HP Servers

For HP Servers the best way I have found so far is to install the HP Proliant in the operating system during deployment using (scripts or MDT/SCCM applications/Packages or in SCVMM as Host Command line post OSD)

That means that I usually don’t import other drivers then Network and Storage drivers in the deployment solution, since the Support Pack will take care of the rest.

The HP Proliant Service Pack: http://h17007.www1.hp.com/us/en/enterprise/servers/products/service_pack/spp/index.aspx

image

However, you do need Windows PE Drivers and the easiest way to find them is to look somewhere else. You will find them in the HP Scripting Toolkit for Windows.

http://www.hp.com/swpublishing/MTX-4bbbd9504e2a4286b6ae8300b4

image

Dell Servers

I have to be honest, I do deploy more HP servers then Dell servers, but when I do I use the standard webpage to download drivers. For servers Dell provides Driver Application Packages, which will install all the drivers for that particular model. Download it and run it as a part of the TaskSequence or do it Post OSD.

http://www.dell.com/support/home/us/en/04/Products/ser_stor_net/poweredge

image

What about System Center Integration?

Yes, there are ready made applications for System Center Integration.

For HP it is called Insight Management: https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=IMDVD#7.3

For Dell it is called OpenManage Integration Suite for Microsoft System Center: http://en.community.dell.com/techcenter/systems-management/w/wiki/4111.openmanage-integration-suite-for-microsoft-system-center.aspx

/Mike

Posted in Drivers | Tagged: , , , , , | 5 Comments »

Nice to Know–Getting Make and Model using CMD or PowerShell

Posted by Mikael Nystrom on December 19, 2013

Trust me, this is not a new thing, rather I get the question every time on a session (before or after) or when working on a customer site, how can I extract the Make and Model from the machine? So, as long as people are asking me, I think I should answer, right? :-)

Make and Model is commonly used in deployment solutions to figure out what drivers that needs to download to each machine during install. It is a part of the SMBBios information and can be accessed using WMI, in WMIC it is called Name and Vendor and in PowerShell it is called Manufacturer and Model. Now, lets take a look.

The Old WMI Method:

Execute wmic csproduct get name,vendor from a CMD prompt.

image

The New POSH Method:

Execute Get-WmiObject Win32_ComputerSystem | Select Model,Manufacturer from a PowerShell prompt.

image

/mike

Posted in Deployment, Drivers, MDT, PowerShell, SCCM, WMI | Tagged: , , , | 4 Comments »

OS Deployment PreCon(s)–Spring and Summer 2012

Posted by Mikael Nystrom on March 3, 2012

This spring I will deliver 3 PreCons on the topic of OSD or Operating System Deployment. All these three will bi similar, we will cover both the basics and the really advanced topics. The focus will be on Windows 7 deployment, but we will also cover Windows 8 and Server Deployment. The tools that we will cover are MAP/ACT, WAIK/ADK, WDS, MDT and SCCM (and then some). The hardware vendors that we will cover are HP, Dell and Lenovo. We had some questions regarding the level of these sessions, so I did an interview with Michael Niehaus

Microsoft TechDays 2012

  • Date: 24th of April 2012
  • Speakers: Mikael Nystrom and Johan Arwidmark
  • Language: Swedish
  • Location: Örebro, Sweden

Microsoft TechEd North America 2012

  • Date: 10th of June 2012
  • Speakers: Mikael Nystrom, Michael Niehaus and Ben Hunter
  • Language: English
  • Location: Orlando, US

Microsoft TechEd Europe 2012

  • Date: 25th of June 2012
  • Speakers: Mikael Nystrom, Michael Niehaus and Ben Hunter
  • Language: English
  • Location: Amsterdam, NL

Posted in ACT, Deployment, Drivers, Lite Touch, MAP, MDT, SCCM, SCVMM, TechEd, Windows 7, Windows 8, WinPE | Tagged: | 3 Comments »

Device drivers can make you feel “differently”…

Posted by Mikael Nystrom on August 15, 2011

Today’s story is about a driver, a driver that did not really wanted to be installed. I’ll guess you been in that situation before and I will give a tip on how to make those drives install like a charm. The driver of today’s topic is a Smartcard driver, so first of all we need to force the driver in to the deployment solution, which normally is not too advanced. You just down load the driver, unpack the driver and import the driver into the Deployment Workbench in MDT or as a driver package into SCCM, in MDT we need to create a selection profile so we can ignore PNP and just inject the driver and so I did. First test shows that, yes the driver does get into the driver store but it does not work. You can always see what driver you have in Windows 7 using DISM

DISM /Online /Get-Drivers /Format:Table

Ok, so now I need to read about this driver, so after a while it turns out that the driver can only be installed using “Right click on the INF file and select install” method, Well that then tells me that using the old Rundll32 trick should work, but no luck. Ok, ok let us try the Devcon trick the, nope sorry. Now at this time the customer is asking me if I have any problems and of course I don’t have any problems, it’s just a “bad” driver-day…

So, it works when right clicking, ok. But nothing else seems to work, hmm. There is one thing I haven’t tried yet and that is to use the IExpress trick, let us try that and 25 minutes later (re-deploy the machine) it worked like a charm. Now you may ask yourself. –What is the IExpress trick?

Package nasty drivers in a self-extracting and self-installing executable

Now, let us be very clear about one thing, all other methods are better than this (if they work) but sometimes I don’t have time to fly over to the developer with my baseball bat and explain how to do things…

1. Get the driver

In this case the driver is downloadable from the vendor and from http://catalog.update.microsoft.com. From the Vendor it’s a ZIP and from MS catalog it’s a CAB file. A nice thing about MS Catalog is that you can search for the PNP number, but in this case I know the name. A search on “HID C200” will give me “HID Global – Input – HID Crescendo C200”

2. Unpack the driver

ZIP files is, well just ZIP file. CAB files can be opened easily using the command Expand

Expand file.CAB –f:* C:\Driver

3. Pack the Driver using IExpress

What you might not know is that included in Windows 7 there is a packaging application called IExpress and in this case it is really useful.

So, here is the step by step:

clip_image001

Start IExpress by typing IEexpress in a CMD prompt and select to create a new package.

clip_image002

Select to “Extract and run an installation command”.

clip_image003

Give it a name.

clip_image004

Select no confirmation prompt.

clip_image005

Don’t display any license agreement.

clip_image006

Browse to the folder where you have unpacked the drivers and select them all.

clip_image007

Use the dropdown list and select the inf file, if you want to run something else like a batch file, just type the name and it will work.

clip_image008

Nope, no windows please…

clip_image009

Nope, don’t need any kind of messages…

clip_image010

Be sure to select “long names” if the driver have that".

clip_image011

Nope, no restart, we will fix that in the task sequences ourselves.

clip_image012

Save it.

clip_image013

Create the package.

clip_image014

Wait…

4. Deploy the package

Now you have an executable application that works in MDT (have not tested in SCCM, but it might work there too) that will deploy the “nasty” driver in a way that works…

/mike – aka the Deployment Bunny

Posted in Deployment, Drivers, MDT, Windows 7 | Tagged: , , | 1 Comment »

Nice to know: – Why did Windows 7 pick THAT driver ?

Posted by Mikael Nystrom on June 6, 2011

Working with customer is fun and challenging, best thing is that the ask very relevant question, questions that I asked my self long ago but never gave it any thoughts. Recently a customer asked me, “How do make Windows pick the correct driver?” and that my friends are a really god question

The secret behind this is called ranking, ranking occurs when drivers are added to the driver store and that happens of course when we deploy a new Windows 7 machine and drivers are injected. When using MDT in a LiteTouch configuration, the LiteTouch script will do a Plug and Play scanning of the hardware and the use the information the get the correct drivers from the MDT out-of box drivers folder. Now, MDT cant really “know” if that particular driver is the perfect driver so it will copy all drivers to the \Drivers folder on the machine to be deployed. But if you use Driver Groups or any other method that will “filter” the drivers the script would then only copy the one and only driver need.

Well that’s in the perfect word and since that does not exist we will get multiple drivers copied down to the \Drivers folder and then when MDT (using DISM in a offline mode) pushes those drivers into the OS there will be scenarios when we are going to have drivers that have the same PNP number and Windows must choose the correct one and now its time for ranking. In the best of worlds, when all the vendors created perfect drivers and everyone is always running the latest and the greatest this would not be a problem. But in the reality not all vendors have a perfect .inf file, in fact some of them are uglier then others and they does not even work.

Before we go into details on how that work, you might want to know how to “see” this, well that is not a secret there is of course a log file for that and the logical name for that is c:\Windows\inf\setupapi.dev.log and here is a sample where it just happens to be two drivers to pick from: (This log files has been modified and shortened just to show you)

The answer is in setupapi.dev.log

     dvi:      Enumerating INFs from path list ‘C:\Windows\inf’
inf:      Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af\usb.inf’ ([strings.0409])
dvi:      Created Driver Node:
dvi:           InfName      – C:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af\usb.inf
dvi:           Rank         –
0x00ff2007
dvi:      Created Driver Node:
dvi:           InfName      – C:\Windows\System32\DriverStore\FileRepository\ewusbdev.inf_amd64_neutral_7ed8b2230e11292c\ewusbdev.inf
dvi:           Rank         – 0x00ff0001
inf:      Searched 2 potential matches in published INF directory
ndv:      Selecting best match from Driver Store (including Device Path)…
dvi:                Selected:
dvi:                     Description – [HUAWEI Mobile Connect – USB Device]
dvi:                     InfFile     – [c:\windows\system32\driverstore\filerepository\ewusbdev.inf_amd64_neutral_7ed8b2230e11292c\ewusbdev.inf]
dvi:                     Rank        – [0x00ff0001]

setupapi.dev.log  explained

    • Windows is missing a driver for 0x00ff2007
  • It finds two INF files that could be used
  • By “ranking” them Windows then make a decision
  • The driver with the lowest value wins, since that just have to be the best…
  • In this case
  • 0x00ff0001 is lower then 0x00ff2007 and therefore the HUAWEI Mobile Connect – USB Device is better then a generic USB driver

 

Why and how?

It is always nice to know what all these number means and here it is:

(The official “not so easy to understand” page is here http://msdn.microsoft.com/en-us/library/ff546225(VS.85).aspx“)

The ranking number is divided into 3 parts 0xAABBCCCC

  • AA stands for: – “Signature Code”
    • This one is easy, 00 means its signed, ff means that it is not signed. You can also see how the signer is in the log file
  • BB stands for: – “Feature Score”
    • Well, here is when the fun begins, the feature score is something the vendor decide by themselves, but to be honest I have not seen this being used by anyone. It should popup in the .inf file if they do.
  • CCCC stands for: – “Identifier Score”
    • This is also pretty simple, almost every device have at least for different PNP number, here is my NVidia card

image

And you can see that I have four different PNP numbers on this one, the top one is the exact match, the bottom is kind of generic. The better driver I have the better it will match the top of this list and that will make a low value.

So the best driver you could possible have is 0x00000000, but I have not really seen that kind of driver (yet)

You can find some more information on TechEd on this here:

/mike aka Deployment Bunny

 

Posted in Deployment, Drivers | Tagged: , | 6 Comments »

Nice to know: – Blocking OS install on unsupported models in Microsoft Deployment Toolkit (MDT)

Posted by Mikael Nystrom on June 4, 2011

A customer asked me:

– Is it possible to block an attempt to upgrade, refresh or install the Operating System if that model is not “certified?

– Yes, we can set the OSinstall property to N based on model, that will block any attempt

– But that will block that model from running any Task Sequence? That is not what I want…

Well, that is correct, so I needed a way to block that particular model on that particular Task Sequence, so I  would like something a bit more sophisticated, something like this:

For task sequence “Windows 7 Enterprise x86 – Basic” the following models are supported and for the task sequence “Windows Server 2008 R2 – Basic” the following models are supported (or something like that)  and here is how you do it:

(This has been tested on MDT 2010, MDT2010 update 1 and MDT2012)

Create a new group in your task sequence

  • Open up your deployment workbench
  • Open your task sequence
  • Add a new group called “Certified Hardware”

Like this:

image

Setting condition on the group

  • Select the group Certified Hardware
  • Select Options for that group
  • Add the following condition:

Task sequence variable “Model not equals HP ProBook 5310m” (if that is the model that you support for this Task sequence)

Like this:

image

Adding the “blocker”

  • Select the group
  • Add a “Set Task Sequence Variable”
  • Task Sequence Variable = OSInstall
  • Value = N

Like this:

image

Adding script that will write in the log and display “why” the OS install failed

Without this step it will just display a “failed”, but maybe, just maybe you would like to have it a bit more sophisticated. So let us add a script

The script should go into the Scripts folder and you can download it from my SkyDrive http://cid-8563304f134ddcb6.office.live.com/self.aspx/BlogFiles/ZTIUnSupportedHardware.zip

  • Download it
  • Extract it
  • Save it in the scripts folder
  • Add a run command before the Set Task Sequence Variable
  • Use this command : cscript.exe “%SCRIPTROOT%\ZTIUnSupportedHardware.wsf”

It should look like this:

image_thumb[3]_thumb[1]

Let us take a look in the BDD.log file

Here is how it looks in BDD.log

image_thumb[7]_thumb[1]

Next step

With this in place you can prohibit installations of Domain Controllers on Laptops, Hyper-V servers on Virtual Machines and people trying to refresh a Machine from XP to XP even if you have NO device drivers for that model, my guess is that this will solve a couple of “Ops, sorry”

If you want to you can add scripts and other logic to this, things that automatically runs a scripts that will collect the hardware information to a log so that you then can figure out what drivers are needed or something like that, or you could add the “Send Email” script so it will send an email to you saying that some “schmuck” tried to do something bad. You could also add the userexit script for ModelAlias and use that. You could also add other conditions, like Firmware, certain kind of hardware and so on. It would be for example possible to run a Web Services that checks if this computer is correctly added into the asset management database or something like that.

Yes, you can also use CustomSettings.ini to perform similar

And here is a couple of samples of that:

Sample No:1 – Blocking on Model

Here is the “easy” way, the only downside with this one is that it will only block based on Model and that could be perfectly ok in many situations.

[Settings]
Priority=Model, Default
Properties=MyCustomProperty

[Default]
OSInstall=N

[HP ProBook 5310m]

OSInstall=Y

[Virtual Machine]
OSInstall=Y

Sample No:2 – Blocking on Model + Task Sequence:

In this sample we create one property and two priority blocks. If we run this WHEN the task Sequence is known (That means that you need to re-run the gather process with “process rules”, ZTIGather will set the model + Task Sequence ID in to the property Model_TS in the [Init] section, it will then process the [CertifiedHardware] section and the use the Subsection to continue to the section that matches the Model+Task Sequence ID, in this case since my machine is a VM running on Hyper-V it will be “Virtual Machine” and if the Task Sequence is W7X64 it will process the [Virtual Machine_W7X64] section and OSinstall property will be set to Y.

[Settings]
Priority=Init, CertifiedHardware, Default
Properties=MyCustomProperty, Model_TS

[Init]
Model_TS=%Model%_%TaskSequenceID%

[Default]
OSInstall=N

[CertifiedHardware]
SubSection=%Model_TS%

[Virtual Machine_W7X64]
OSInstall=Y

More tips…

You can of course block OS install temporary, during maintenance could be a valid scenario. A good friend (And fellow MVP) Maik Koster created a solution for that (I tricked him into it) and you can read a bit more about it here. http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx

And here are some more discussions on how to pick the info from the Database: http://social.technet.microsoft.com/Forums/en-US/mdt/thread/412e54d9-549f-4828-9d5d-d41d14df77e8

/mike aka the Deployment Bunny

Posted in Deployment, Drivers, TechEd, Windows 7, Windows Server 2008 R2 | Tagged: , , | 2 Comments »