Often times you need to update a HP workstation or server with several drivers.  Or perhaps you’re working with Microsoft Deployment Toolkit and you need to refresh the drivers for a model.  Extracting each of the drivers, one at a time, is time consuming.  Alas, PowerShell to the rescue.

How to Use

Download your sp*.exe files to the folder of your choice.

  1. Save the code below as ExtractDrivers.ps1.
  2. Open an elevated PowerShell console (Run as Administrator…).
  3. Type ./ExtractDrivers.ps1 -ExtractFrom C:\Path_to_SPs -ExtractTo C:\Path_to_Drivers
  4. Watch magic happen.

Code

Conclusion

This is a simple script that could be modified for other vendors as well (I deal with HP/HPe most).  If you have any questions or suggestions, post below or contact me.

3 comments on “Extract Drivers from HP/HPe Support Packs with PowerShell

  • I have all my SP*.exe files in a folder located at E:\Drivers\HP 250 G2\
    I am trying to extract into the same folder. The script creates the folder structure, but does not extract any files

    cmd : ‘E:\Drivers\HP’ is not recognized as an internal or external command,
    At E:\Drivers\ExtractDrivers.ps1:21 char:2
    + cmd /c $cmdline $param
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (‘E:\Drivers\HP’…ternal command,:String) [], Remo
    teException
    + FullyQualifiedErrorId : NativeCommandError

    operable program or batch file.

Leave a Reply

Your email address will not be published. Required fields are marked *