MSEndpointMgr

Driver Automation Tool 4.1.0 Released

Silent Running Option

A common request over the past while was to create an option to run the Driver Automation Tool in the background as a scheduled task. So in this release I have added in the functionality, allowing you to schedule the job directly within the tool.

When you run the Driver Automation Tool in full GUI mode you will notice that there is a new tab labelled “Scheduling Options”. In this tab you select the time for the job to run, the location where you wish to run the script from and credentials for the service account.

The credentials will be tested against active directory to ensure that they are correct, you should however ensure that the account has sufficient rights to your ConfigMgr environment and Run As A Service rights.

How Does It Work?

Contained within the directory specified for the scheduled task, the GUI will automatically copy across the newly created Run-DriverAutomationToolSvc.ps1 script. This script is a scaled down version of the GUI script containing all of the core features and designed for silent running in conjunction with the exported XML settings from running the GUI to perform the initial selections.

Upon initial launch of the GUI to make the required selections, an XML settings file will be generated and maintained both for the GUI and silent running option. Upon each subsequent GUI launch, the file will be replaced however it will read in the previous settings to ensure that you do not have to start from scratch.

If you wish to run the GUI tool for a once off download without updating the XML file you can call the PS1 directly and use the “-NoXMLOutput True” switch

XML Example
Script In Action
Logging

Upon the first run of the scheduled task, sub-folders will be created for the temporary files and the log file. The logging provides the same output as running the full GUI tool, example:

Other Improvements

Microsoft Surface Drivers

It was reported to me that in some instances the UNC path for the extracted drivers was going beyond the 255 character limit due to the folder names generated by the MSI. To get around this the drivers are now extracted locally and only the Drivers and Firmware folders (and their sub-folders) are moved to the UNC path specified, thus greatly reducing the path length and should resolve any import or packing issues.

Improved Validation

Validation has been included to help ensure you pick all the required options before starting the download process and to ensure that the XML generated does not contain null entries.

MDT WMI Manufacturer Naming

For those of you using the total control method with MDT, I have included a switch in the code which will automatically replace the friendly manufacturer name with the full WMI name.

User Guide

A user guide is now included to cover the basic operations to get the script up and running.

Download The Script

You can download the script from the Microsoft Technet Script Repository – https://gallery.technet.microsoft.com/Driver-Tool-Automate-9ddcc010

Maurice Daly

Maurice has been working in the IT industry for the past 20 years and currently working in the role of Senior Cloud Architect with CloudWay. With a focus on OS deployment through SCCM/MDT, group policies, active directory, virtualisation and office 365, Maurice has been a Windows Server MCSE since 2008 and was awarded Enterprise Mobility MVP in March 2017. Most recently his focus has been on automation of deployment tasks, creating and sharing PowerShell scripts and other content to help others streamline their deployment processes.

13 comments

  • How can models be added to this? We have some HP models that are not listed.

    • Hi Tom,

      The model listings come direct from the vendors in the case of Dell, HP and Lenovo. In some cases it is a case that they do not support particular OS combinations through their official SCCM driver package support path.

      Maurice

  • Using 4.2.0. Unable to get it to post the driver packages in SCCM.

    ======== ConfigMgr Precision WorkStation T3500 DRIVER PROCESSING STARTED ======== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: URL Found: https://downloads.dell.com/ 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Creating Precision WorkStation T3500 download folder 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Downloading T5810-win7-A07-XK4PK.CAB driver cab file 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Downloading from URL: https://downloads.dell.com/ 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Driver Revision: A07 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: T5810-win7-A07-XK4PK.CAB File Exists – Processing Driver Package 1/1/1601 12:00:00 AM 0 (0x0000)
    ==================== ConfigMgr DRIVER EXTRACT ==================== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Expanding Driver CAB Source File: T5810-win7-A07-XK4PK.CAB 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Extracting Dell Drivers to E:\LIBRARY\DRIVERS\REPOSITORY\Dell\Precision WorkStation T3500\Windows7-A07 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Checking For Extracted Drivers 1/1/1601 12:00:00 AM 0 (0x0000)
    ======== DRIVER EXTRACT ISSUE DETECTED ======== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Issues occurred while reading extracted drivers 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Driver count in path E:\LIBRARY\DRIVERS\REPOSITORY\Dell\Precision WorkStation T3500\Windows7-A07 – 0 1/1/1601 12:00:00 AM 0 (0x0000)
    ======== ConfigMgr Precision WorkStation T3500 DRIVER PROCESSING FINISHED ======== 1/1/1601 12:00:00 AM 0 (0x0000)

  • Hi Maurice,

    I am trying to DL the drivers for the Acer P259 but the DL is failing. BITS is running and has been restarted but I have noticed in the log that it appears an extra “http:” is being appended to the DL string.

    ConfigMgr: Downloading from URL: http:https://global-download.acer.com/SupportFiles/Files/Support/SCCM/TMP259-M_Windows7_All.exe

    but further up in the log it is correct:

    ConfigMgr: URL Found: https://global-download.acer.com/SupportFiles/Files/Support/SCCM/TMP259-M_Windows7_All.exe

    I have tried to figure out the .PS1 myself to determine why this is happening but after a little trial and error, it has been to no avail!

    (BTW, DLs from Dell do work… it appears to be in the Acer Logic only…)

    • Hi Will

      This might be something to do with Acer changing their links on the site. I haven’t had many people using that option, but it’s updated and fixed in the new release.

      Maurice

  • Is there still issues with Dell and Driver/BIOS packages, as i cant seem to get it to work anymore after it broke the other day..

    • Hi Thomas

      Can you give examples?. Have you tested the URL’s retrieved from the XML contained within the log as there have been issues with bad links in the Dell XML of late.

      Maurice

      • I have Version 4.1.1, and whenever i start the Tools, i get Reading driver Pack XML File d:\blablabla\Temp\DriverPackCatalog.xml file, and 0 Known Dell Models found.

        the DriverPackCatalog.cab file has not been updated since August 9th.
        The DriverPackCatalog.xml file is missing.

        If i try and find models from manufactor flip from Dell, it comes back empty..

        If i try to download New drivers, the system says its already there, as it probably hasnt been able to check for New Versions of the model..

        At a futile attempt i deleted the DriverPackCatalog.cab file as a last effort and it seems that made the trick, it created a New file and it Works better now.

      • Hi Thomas,

        It looks like just an issue with the cab then. I was previously deleting this on each subsequent run, however I am sure Dell wouldn’t appreciate the potential of thousands of computers downloading the cab each time the tool was run so I changed it to remove the XML if it was older than 7 days, overlooking the cab in this instance. I will update the code to remove the cab; you can add this in by changing this section:

        Get-ChildItem -Path $global:TempDirectory -Recurse -Filter *.xml -File | Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-7) } | Remove-Item -Force

        to

        Get-ChildItem -Path $global:TempDirectory -Recurse -File | Where-Object {($_.Name -match “.cab”) -or ($_.Name -match “.xml”) -and ($_.CreationTime -lt (Get-Date).AddDays(-7)) } | Remove-Item -Force

        Maurice

  • Error: Errors Occurred While Creating Package 1/1/1601 12:00:00 AM 0 (0x0000)

    Is there any way to get more information as to what happened here?
    Thanks

  • So its more a “heads-up” for others.

    I just used the new driver tool to fill out some missing models.
    It searched my sccm and found all my models (a very nice feature!) and i figured i might as well check all if newer drivers was avail.

    What i did see was that some packages was being re-created even though they were same version number.
    All my driver packages was recently created with version 0.9 of your driver script – with the new Lenovo goodies.
    See snip of my log.

    It did it because i had removed a driver from the package – Nvidia driver – but not the source.
    My T460s does not have Nvidia card and the package comes with Nvidia and Intel drivers – causing my DISM to fail.

    Make sure you remove the driver both places then it will just see it as “already exists”.

Sponsors