Grabbing out-of-box drivers from a Windows 8 system

It seems like a common request:  I’ve got a brand new system, right out of the box from the OEM.  It has all the drivers on it that are needed.  So rather than find and download those same drivers from the OEM’s website, why can’t I just extract the drivers from OS that’s already on the system?

Well, you can – with some caveats described below.  I’ve never been a big fan of this approach due to those caveats, but it can work well in some scenarios.  It’s a little scary that people will download random utilities from random websites to do this though, especially when it’s so easy to do on Windows 8 and above using PowerShell.

So attached to this blog is a script for doing just that.  It’s really quite simple, as it leverages the “Get-WindowsDriver” PowerShell cmdlet to get the list of out-of-box drivers (which is what the cmdlet does by default).  The meat of it:

Get-WindowsDriver -online | % {
   $dir = Split-Path $_.OriginalFileName -Parent ;
   $subdir = Split-Path $dir -Leaf ;
   $driverDest = "$destination\$subdir";
   Write-Host "Copying $dir to $driverDest\$subdir" ;
   Copy-Item -Path $dir -Destination $driverDest -Recurse

(Don’t try to copy and paste this, unless you set the $destination variable manually.  The attached script is set up as a cmdlet and will prompt for that destination path, which should already exist.  The attached script also includes the required disclaimer that says this isn’t supported by Microsoft in any way.)

The logic is fairly simple:

  • For each out-of-box driver, get the original file name, which is the full path to the INF file in the driver repository folder, e.g. C:\Windows\System32\DriverStore\FileRepository\driverFolder\driver.inf. 
  • Chop the file name off of that to get the folder path, e.g. C:\Windows\System32\DriverStore\FileRepository\driverFolder. 
  • Chop the folder name from that path to use in the destination, e.g. driverFolder.
  • Copy from source to destination.

That’s it.  Give it a few minutes to run (the Get-WindowsDriver cmdlet will take a little while to execute as it sifts through all the drivers), then look at the destination folder you specified to see all the drivers.

Now for the caveats:

  • This assumes that all the files required for the driver and/or device are present in the driver folder.  While the core driver files should be there, any applets, control panels, shell extensions, etc. might not be.  So you might need to install the full OEM package to get complete functionality.  In some cases, the driver may not even work without this (e.g. Bluetooth, mobile broadband).
  • You might get more drivers than you really need.  For example, my laptop has over 100 out-of-box drivers.  Does it really need 100 drivers to work?  No, it only needs 6-7.  Some are older versions, some are for various USB devices that I’ve attached in the last year (printers, cameras, headsets, DisplayPort docks, etc.), some I have no idea where they came from.  So the cleaner the system is, the better.
  • You will probably get old versions.  The images that OEMs ship on new machines aren’t always kept up to date, so you might find that those original drivers have “issues” – some will get updated immediately from Windows Update, others will require updating from the OEM’s website anyway.  (I would definitely check for the latest video and network drivers regardless.)

Good luck.


Comments (11)
  1. Octavio Rdz says:

    Hi Michael the day yesterday in powershell script implemented by changing to a valid path, the process framework not only mistake that the entire list of drivers I copied only 4 elements, of the many that exist in the FileRepository folder … to think that this process is due? greetings from Aguascalientes Mexico


  2. Octavio Rdz says:

    ok I get it to all drivers only deals with extracting those that are really needed to make use of them, anyway thank you very much for the script Michael greetings …. everything went to perfection 🙂

  3. Richard says:

    Hi Michael,does this sound feasible? Using MDT2013 to create 8.1 images then copying them to SCCM 2007 for distribution?

  4. Anonymous says:

    Pingback from MS Surface RT School Deployment

  5. Anonymous says:

    As we were going through our TechEd North America deployment pre-conference today, we showed a lot of

  6. Anonymous says:

    Pingback from Material de apoyo usado en la preconferencia de TechED NA 2014 (deployment??s) + links de interes – Freelance-IT Ags, Mex.

  7. Anonymous says:

    Pingback from Michael Niehaus Notes from TechEd North America | What have I learnt today?

  8. smt says:

    thank you very much. im having hard time with my intel wireless n2230 it keeps dropping connection. only stable driver comes from windows update on win8.1 that way ill move that driver to windows10

  9. Anonymous says:

    Inspired by Michael’s blog post on grabbing drivers from running computer from here:

  10. Erman Stells says:

    Code I used to put the drivers here on my machine: C:testingDriverBackup

    Get-WindowsDriver -online | % {
    $dir = Split-Path $_.OriginalFileName -Parent ;
    $subdir = Split-Path $dir -Leaf ;
    $driverDest = "C:testingDriverBackup$destination$subdir";
    Write-Host "Copying $dir to $driverDest$subdir" ;
    Copy-Item -Path $dir -Destination $driverDest -Recurse

Comments are closed.

Skip to main content