MDT – Drivers – PowerShell is king

By arwidmark / February 18, 2011

If you have read any of my articles on MDT and drivers you know that, for most environments, I like to have total control of my drivers (rather than the Total Chaos method which is default in MDT).

This means that I normally create a more detailed folder structure in the deployment workbench, that matches the drivers folder that I have on disk.Of course I could use old school DriverPaths method on MDT to avoid importing the drivers all together, but I kind of like the single instance store in MDT, and being able to use additional filter if I want to.

Here is a powershell script that imports drivers into MDT from a folder structure on disk…

Note: This script is written to import drivers into a clean driver store, the current version does not handle updates, so if you need to add more drivers, simply clean the store, and run the script again.

Download the Import Drivers From File System Script

The structure on disk looks like this:

After running the script, it will look like this in the deployment workbench

You need to edit the following information in the script to reflect your environment

$DriverStore = “C:\Drivers”
$MDTDSRoot = “C:\MDTBuildLab”
$PSDriveName = “DS001”

Happy Scripting…

/ Johan

About the author

arwidmark

Chad - July 20, 2011

Johan, I need help with a major hurdle using MDT 2010. What is the best place to post a problem to get your help? I posted here because I didn’t see an e-mail address for you. Thanks,
-Chad

arwidmark - July 23, 2011

I have sent an email to the address you reigstered with.

I do try to monitor the technet forums, so that’s a good place to ask questions too…

/ Johan

DaveK - December 7, 2011

Johan,
How about a script that does the reverse. Take the MDT OOB drivers store and export it to a FileStore.
Thanks
Dave

Jonas Voll - February 3, 2012

Hey I am looking for some way to install or deploy operating systems!
This will need to be accessible for the blind and other disabled computer usres!
Support for Audio. Screen magnifiers & screen readers will be required.
Support for audio or speech synthesis!
You may find most of these hardware devices in various configurations such as USB or PCI!
Thanks!

arwidmark - February 3, 2012

Hi Jonas,

I’m sorry but WinPE does not support audio, rendering screen readers useless. I haven’t seen that being added to future versions of WinPE either. I will meet the product teams at the MVP Summit in Redmond late february. I will raise the questions then…

/ Johan

James - April 18, 2012

Johan,

If I segment each driver using this method will the driver store I use increase exponentially? If I have 20 systems using a drive each model I create under Windows XP, Windows 7 x86 and Windows x64 would need each own driver under each folder, correct? So this wil store the driver three times. Is there a way to reference a driver that is used for several models?

arwidmark - April 18, 2012

The store its single instance, you can link to a driver in another folder without storing it twice

/ Johan

jei3 - May 14, 2012

Johan,

Long time lurker, first time poster. Thanks for all of your insight both here and on the MSDN forums. Anyhow, I have a simple question about this process in terms of cleaning up the driver store. Once I delete all of the old drivers out of it and run the update Deployment Share in the MDT2012 MMC, I still see in Windows Explorer that \DeploymentShare$Out-of-Box Drivers has over 1GB of files and folders, despite the MDT2012 MMC showing Out-of-Box Drivers as being empty. In order to clean the drivers out as you specify in your article, do we go by what the MDT2012 MMC is showing in the Out-of-Box Drivers container or do we use Windows Explorer to delete the files and folders underneath the \DeploymentShare$Out-of-Box Drivers? Thanks.

Comments are closed