DeployEverything Lenovo Driver Download Automation Tool

This is the third in the series of “DeployEverything Driver Download Tools”, this time focusing on Lenovo hardware. If you are running Lenovo client machines and using MDT or SCCM for deployment, this tool automates a significant part of preparing your environment for the deployment of these machines, via the process of downloading, extracting, importing and packaging of drivers.

The script works by reading an XML from Lenovo’s site, reading in the XML and doing some other bits in the background to display the full list of Lenovo driver packages in an easy to read format.

So summarise it does the following;

The tool automates the following processes;

  1. Reads in the XML containing model details
  2. Displays Lenovo Driver Packages based on the OS selection within the GUI
  3. Creates Folders For Each Model
  4. Downloads the selected model driver files
  5. Extracts the driver files
  6. Imports the drivers into SCCM, MDT or Both
  7. Create a Category based on the machine model
  8. Create a Driver Package based on the machine model and OS
  9. Imports the associated drivers into the newly created Driver Package

The job progress log window will automatically scroll at each step of the process and provide feedback.

Job Importing Drivers into SCCM

Job Importing Drivers into MDT

Microsoft Script Library Link – https://gallery.technet.microsoft.com/Lenovo-Driver-Automation-040751e4

How To Run The Script

Launch the script from an administrative PowerShell window using an account with rights to your SCCM site server (if using the SCCM query option)

Enter the name of your SCCM site server and click “Connect to SCCM” if you wish to run an SCCM enabled import job, otherwise select MDT. The list of Lenovo models will auto populate and then select your OS before selecting the model / model family driver packages you require.

Things To Note

  1. Direct internet access is required.
  2. Import driver jobs can take considerable time, this is the same for OEM tools but something to be aware of as the GUI remains static during this process at present. If you are downloading drivers for multiple models you might wish to run this overnight.
  3. Lenovo driver packs for Windows 8.1 and 10 at the present time are for 64 bit versions of the operating system only.
  4. IE ESC will generate pop up’s during the running process. Unfortunately I have not been able to find a way around this due to the way in which the exe links are obtained.

Change Log

Version 1.0 – Initial release.
Version 1.1 – Bug fix for Lenovo web content change
Version 1.2 –  Proxy settings added and bug fix for SCCM downloads. Added percentage and KB output for downloads when SCCM/BOTH is selected.
Version 1.3 – Proxy setting sections updated, additional checks added.
Version 1.4 – Windows 7 bug fix.

Screenshots:


Importing INF Drivers into SCCM

Driver Repository Packages


Driver Packages Created

SCCM :Carbon X1 Generation 4 Diver Pack Contents

MDT: Carbon X1 Generation 4 Diver Pack Contents

SPECIAL THANK YOU

Goes out to Joe Parker (https://twitter.com/joe_lenovo?lang=en) in Lenovo for assisting with the XML creation and ongoing support for the production version using a Lenovo hosted XML.

Maurice Daly
Maurice has been working in the IT industry since 1999 and was awarded his first MVP Enterprise Mobility award in 2017. Technology focus includes Active Directory, Group Policy, Hyper-V, Windows Deployment (SCCM & MDT) and Office 365.

(2502)

comments
  • Patrick Nuckle
    Posted at 20:36 February 13, 2017
    Patrick Nuckle
    Reply
    Author

    Hi, the Lenovo version is not working for me. There is no Proxy tab like in the screenshot, and also the Model List is not populating.
    Thanks

    • Maurice Daly
      Posted at 20:57 February 13, 2017
      Maurice Daly
      Reply
      Author

      Hi Patrick. The screenshots were taken of a later build of the script in which I will have proxy server settings. If the model list is not populating make sure you downloaded the latest version off of the MS site (not the beta from earlier) and you have direct Internet access as per the notes.

      • Patrick Nuckle
        Posted at 21:23 February 13, 2017
        Patrick Nuckle
        Reply
        Author

        Hey Maurice, I tried with IE configured with a pac file and with a static proxy. It still doesn’t work. I downloaded the script again to make sure that I had the correct version, and I did, from the TechNet lin. I’ll wait for the next version.
        Thanks

        • Maurice Daly
          Posted at 21:27 February 13, 2017
          Maurice Daly
          Reply
          Author

          Patrick the commands within the script require switches if they are to work through a proxy. That is obviously the issue here for you, I’ll have proxy settings up in the next release and I’m adding them in at the same time for the HP one so all three are fairly similar in layout.

  • Siddharth
    Posted at 09:24 February 14, 2017
    Siddharth
    Reply
    Author

    Hello Maurice ,

    First of all kudos to you for this tool ..
    I am having few issue though with this .
    Its not downloading anything , it creates the folder structure in our driver repository and SCCM , but nothing is downloaded.
    It creates a folder structure 1)Lenovo–>T460–>badLink-Windows10-x64 and DrverCab , these 2 folders are all empty .
    My machine is directly connected to internet as well , no proxy.
    Would really appreciate , if you can help out on this. 🙂

    • Maurice Daly
      Posted at 10:15 February 14, 2017
      Maurice Daly
      Reply
      Author

      It appears that Lenovo made a change on their website last night and removed one of the values I was searching for to determine the latest exe. I have updated the script to just search for the .exe file on the site and it is working now. Version 1.1 has been uploaded to the MS script site.

      • siddharth
        Posted at 10:18 February 14, 2017
        siddharth
        Reply
        Author

        Thanks Maurice, I will try the revised one.

  • Siddharth
    Posted at 12:06 February 14, 2017
    Siddharth
    Reply
    Author

    Hi Maurice ,

    I tried the new file but still no success , but now i can see it goes to lenovo website to download the exe and puts a.tmp file in driver cab folder but than exits.

    • Maurice Daly
      Posted at 12:20 February 14, 2017
      Maurice Daly
      Reply
      Author

      Hi Siddharth,

      I have just sent you a mail on this.

      Maurice

      • Siddharth
        Posted at 06:43 February 15, 2017
        Siddharth
        Reply
        Author

        Hi Maurice,

        Now it works like a charm!!!!!!!
        Thanks a lot for your assistance!!!!

        Siddharth

  • T Huynh
    Posted at 15:24 February 14, 2017
    T Huynh
    Reply
    Author

    Hi,

    I think there maybe some issue with xml file as I am not seeing all Lenovo models in pick list. For example, the x250,T450, T450s are models in between X240 and X260 and T440 and T460 respectively. I am getting bad link added into MDT.
    MDT: MDT Driver Path = DS001:Out-of-Box DriversWindows 10 x64LenovoX260badLink

    • Maurice Daly
      Posted at 23:45 February 14, 2017
      Maurice Daly
      Reply
      Author

      Hi,

      The list of models is pulled out of the XML provided by Lenovo. See below the full list of machines from the XML listed as Win10 compatible;

      $LenovoModelXML.products.product | Where-Object {$_.os -like “*win10*”} | ft Model,OS

      model os
      —– —
      M600Tiny win10
      M900x win10
      M93p win10
      11e1stGen win10
      11e3rdGen-Braswell win10
      11e3rdGen-Skylake win10
      13 win10
      L450 win10
      L560 win10
      P40Yoga win10
      P50 win10
      T440s win10
      T460s win10
      T560 win10
      X1Carbon3rd win10
      X1Carbon4th win10
      X240s win10
      X260 win10
      Yoga11e1stGen win10
      Yoga11e3rdGen-Braswell win10
      Yoga11e3rdGen-Skylake win10
      Yoga14 win10
      Yoga15 win10
      Yoga460 win10
      P310 win10
      P410 win10
      P500 win10
      P510 win10
      P700 win10
      P900 win10

      I will pass this back to Lenovo.

      Maurice

  • T Huynh
    Posted at 17:07 February 15, 2017
    T Huynh
    Reply
    Author

    Yes, clearly Lenovo needs to correct the inconsistency. Here is the full list of Win 10 tested compatible devices https://pcsupport.lenovo.com/solutions/HT103535 Thanks for making this tool available!

  • T Huynh
    Posted at 17:09 February 15, 2017
    T Huynh
    Reply
    Author
  • Ben
    Posted at 21:37 February 24, 2017
    Ben
    Reply
    Author

    Getting ERROR Could not obtain X1Carbon2nd link page.. Skipping. on all driver packs for Windows 7 x64

    • Maurice Daly
      Posted at 22:02 February 24, 2017
      Maurice Daly
      Reply
      Author

      Hi Ben. I’ll take a look as I know Lenovo were working on an update to the XML this week. Let me see if anything has changed.

    • Maurice Daly
      Posted at 22:58 February 24, 2017
      Maurice Daly
      Reply
      Author

      Hi Ben. I found the issue here. An update to the code is to follow on the MS Script Library shortly. It will be added as v1.4

      • Ben
        Posted at 14:12 February 27, 2017
        Ben
        Reply
        Author

        Thank you! This will make my job a whole lot easier. More time for websurfing lol

  • Brad
    Posted at 04:01 February 25, 2017
    Brad
    Reply
    Author

    Hi Maurice,

    Nice script, thanks for sharing. When parsing the xml catalog, it seems the x240s-win10 pack points to a card reader driver instead of the driver pack. Here’s the link in the xml: https://support.lenovo.com/downloads/ds104961, and here is the actual pack: https://support.lenovo.com/downloads/ds104691. Looks like a typo.

    I didn’t know who to report this to at Lenovo. Thanks again.

    • Maurice Daly
      Posted at 19:41 February 26, 2017
      Maurice Daly
      Reply
      Author

      Hi Brad I’ll pass this on.

  • S H
    Posted at 11:23 May 23, 2017
    S H
    Reply
    Author

    Hi – just run the tool.

    it downloaded the cab file, created all the files and folders in the OS folders, but hasn’t imported or created drivers/driver packages in SCCM?

    • S H
      Posted at 11:24 May 23, 2017
      S H
      Reply
      Author

      Hi – just run the tool.

      it downloaded the cab file, created all the files and folders in the OS folders, but hasn’t imported or created drivers/driver packages in SCCM?

      I also see the following in the PS window:

      Get-CMDriverPackage : The term ‘Get-CMDriverPackage’ is not recognized as the name of a cmdlet, function, script file,
      or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
      try again.
      At P:\Applications\_UsefulScripts\LenovoAutoDownload\LenovoAutoDownload.ps1:570 char:27
      + $DriverPackage = Get-CMDriverPackage -Name $CMDDriverPackage
      + ~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (Get-CMDriverPackage:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      • Maurice Daly
        Posted at 11:39 May 23, 2017
        Maurice Daly
        Reply
        Author

        Hi Simon,

        The standalone Lenovo tool has not been updated in a while now as a combined manufacturer version is available (http://www.scconfigmgr.com/2017/03/01/driver-automation-tool/). Can you ensure that you are running at least PowerShell 4.0, 5.0+ is preferred though due to issues with the invoke-webrequest command, also ensure that you are running the script on a machine with the ConfigMgr console installed for PS support.

        Maurice

  • Leave a Reply