dell

If you are a Dell hardware house then this script might come in useful for you.

As you are probably aware Dell provide excellent support for SCCM deployments via their Dell Command integration software and up to date driver cab files via their Enterprise Client Deployment site at http://en.community.dell.com/techcenter/enterprise-client/w/wiki/2065.dell-command-deploy-driver-packs-for-enterprise-client-os-deployment.

dellsccmscreen1

When I was refreshing my driver and bios update file repository I got thinking wouldn’t it be nice if I could just run a script that would download these update files based on the models of Dell client systems listed in my SCCM device collections?.

I found a script on Dustin Hedges blog (https://deploymentramblings.wordpress.com/2014/04/17/downloading-dell-driver-cab-files-automagically-with-the-driver-pack-catalog/) but I wanted to automate this further.

So here is my resulting effort. The below scripts requires you to specify your driver file share and your SCCM site server name as a variable, it then does the following;

  1. Queries SCCM for a full list of Dell enterprise client products (Optiplex & Latitude)
  2. Downloads BIOS updates for each model
  3. Downloads the driver CAB for each model
  4. Extract the driver CAB
  5. Import the drivers in the extracted CAB folder
  6. Create a Category based on the machine model
  7. Create a Driver Package based on the machine model and filename
  8. Imports the associated drivers into the newly created Driver Package
  9. Creates a BIOS Update Package based on machine model
  10. Creates a BIOS update deployment PowerShell script for each model using the latest BIOS update and silent switches

Progress bars have also been added for both the system model and driver import stage.

The downloads are stored within sub-folders within the share you specified, e.g;

\\MySCCMServer\Drivers\Dell Optiplex 7040\BIOS
\\MySCCMServer\Drivers\Dell Optiplex 7040\Driver Cabs\

This slideshow requires JavaScript.

Automatically created SCCM Driver Packages:

dellsccmscreen7

SCCM Driver Package Contents;

dellsccmscreen8

 

Multi-Threaded Script

To run the script use the following syntax;

.\DellDownloads.ps1 -SiteServer YOURSITESERVER -RepositoryPath “\\YOURSERVER\DRIVERREPO\” -PackagePath “\\YOURSERVER\DRIVERPACKPATH”

dellmultithread

Multi-Thread Script In Use (Running Code in PS Console)

Task Sequence BIOS Update Script

In the latest release BIOS packaging is included, it also generates a PowerShell script for use at deployment time which is contained within the BIOS folder of the model and uses the latest BIOS exe with silent switches for a silent upgrade.

Note: If you are using a BIOS setup password (which you should be), you will need to specify this within the script (unless you want me to update the script to look for this run running it from the shell).

Modify the following line – $BIOSSwitches = ” -noreboot -nopause /p=%YOURBIOSPASSWORD ”

This slideshow requires JavaScript.

 

UPDATE LOG

08/11/2016
The script has been updated with the following functionality;

  1. Creates BIOS packages for each model downloaded
  2. Creates a deployment PowerShell script containing the latest BIOS exe name and switches for a silent / no reboot update of the BIOS
  3. If the script is re-run it will automatically update the BIOS exe to use in the deployment PS script and update the distribution points.

28/10/2016
As a response to feedback, I have added a $MaxConcurrent jobs variable into the multi-threaded script that lets you specify the max number of jobs in order to control CPU utilization.

26/10/2016
I have added in an additional script below which is multi-threaded. This should help reduce the overall time to download, extract and create the driver packages in large environments with a wide range of models.

16/10/2016
Additional functionality has been added to now automate the process of extracting the CAB, creating computer categories, import the drivers into SCCM and create a driver pack for each of the models / driver packs downloaded.

Script Download Link – https://gallery.technet.microsoft.com/scriptcenter/SCCM-Dell-Client-Bios-ee577b04?redir=0

(484)

comments
  • Kevin
    Posted at 9:39 am 27th October 2016
    Kevin
    Reply
    Author

    Hi there, first of all thanks for this script. I can’t get it to work, here is what happens. I edit all the variables (SCCM Server, Path to the ConfigurationManager.psd1 because our SCCM is setup on the D: drive and source share path.)

    When I run the script, it gives me the following output and nothing else happens:

    # Determine SiteCode from WMI
    try
    {
    Write-Verbose “Determining SiteCode for Site Server: ‘$($SiteServer)'”
    $SiteCodeObjects = Get-WmiObject -Namespace “rootSMS” -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction Stop
    foreach ($SiteCodeObject in $SiteCodeObjects)
    {
    if ($SiteCodeObject.ProviderForLocalSite -eq $true)
    {
    $SiteCode = $SiteCodeObject.SiteCode
    Write-Debug “SiteCode: $($SiteCode)”
    }
    }
    }
    catch [Exception] {
    Throw “Unable to determine SiteCode”
    }

    Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
    ——- —— —– —– —– —— — ———–
    439 36 146676 132868 1597 86,28 4328 AFD2DMonitor
    323 14 8896 14932 68 7,80 5644 AgPkiMon
    2345 31 28252 32480 547 1,52 1256 AIUpdateSVC
    ….
    ….

    # ArrayList to store the Dell models in
    $DellProducts = New-Object -TypeName System.Collections.ArrayList
    # Enumerate through all models
    $Models = Get-WmiObject -Namespace “rootSMSsite_$($SiteCode)” -Class SMS_G_System_COMPUTER_SYSTEM | Select-Object -Property Model | Where-Object { ($_.Model -like
    “*Optiplex*”) -or ($_.Model -like “*Latitude*”) }
    # Add model to ArrayList if not present
    if ($Models -ne $null)
    {
    foreach ($Model in $Models)
    {
    if ($Model.Model -notin $DellProducts)
    {
    $DellProducts.Add($Model.Model) | Out-Null
    }
    }
    }
    # Output the members of the ArrayList
    if ($DellProducts.Count -ge 1)
    {
    foreach ($ModelItem in $DellProducts)
    {
    $PSObject = [PSCustomObject]@{
    Model = $ModelItem
    }
    Write-Output $PSObject
    }
    }

    PS C:Windowssystem32>

    I also tried to set the site code manually because apparently the script can’t find it correctly but it doesn’t help either.

    Best regards
    Kevin

    • modalyit
      Posted at 9:43 am 27th October 2016
      modalyit
      Reply
      Author

      Hi Kevin,

      Just checking first of all that you are running the script on your Site Server?. Can you also let me know if you are running the single or multi-threaded script.

      Regards

      Maurice

  • Kevin
    Posted at 10:11 am 27th October 2016
    Kevin
    Reply
    Author

    Hi Maurice,

    yes I’m running the script on the site server. I’m using the multi-threaded script.

    Thanks!

    Best regards
    Kevin

    • modalyit
      Posted at 10:33 am 27th October 2016
      modalyit
      Reply
      Author

      Hi Kevin,

      OK so stepping through this one step at a time, if you run lines 38-97 do you get any returned values for the $DellProducts or $Models arrays?.

      Maurice

    • modalyit
      Posted at 10:36 am 27th October 2016
      modalyit
      Reply
      Author

      Actually Kevin it looks like that there might have been an issue pasting my script into WordPress. I have just pasted in the script again and run it with no issue. Can you either copy it off of the site or I can email you a copy.

  • Kevin
    Posted at 10:55 am 27th October 2016
    Kevin
    Reply
    Author

    It’s not working, I just copied it again. I also get this in line 49:

    + Begin
    + ~~~~~
    + CategoryInfo : ObjectNotFound: (Begin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    • modalyit
      Posted at 11:02 am 27th October 2016
      modalyit
      Reply
      Author

      I’ve just sent you an email..

  • Kevin
    Posted at 6:36 pm 27th October 2016
    Kevin
    Reply
    Author

    Just a quick update for everyone following this: Maurice has been a huge help today and helped me via Teamviewer. I started the script in PowerShell ISE instead of the normal PowerShell console. That was the problem, now everything is working. 🙂

    • modalyit
      Posted at 10:45 am 28th October 2016
      modalyit
      Reply
      Author

      Hi Kevin,

      Thanks for the feedback by email. I have added in the requested Max Concurrent jobs variable so you can now limit your CPU utilization during the download / package phase.

  • modalyit
    Posted at 10:31 pm 28th October 2016
    modalyit
    Reply
    Author

    Hi Devin,

    An updated script is now on the site and the Microsoft Script Center (https://gallery.technet.microsoft.com/scriptcenter/SCCM-Dell-Client-Bios-ee577b04) that should sort out that issue for you.

    Maurice

  • Leave a Reply