03 April 2018

One-Liner that Updates the Dell Application Component Updates in the Reference Image

While building out the Windows 10 reference image task sequence, it dawned on me that I should be making sure the latest Dell Application Component Updates are installed. Since this is a reference image, the system drivers being up-to-date is not essential to me because they will be stripped during the Sysprep process. This does require that you already have the Dell applications installed before executing this one-liner.

I devised this one-liner that can be implemented as a command line task sequence to check for the latest application component updates only. To limit this down to just application component updates, you will need to open the Dell Command | Update GUI application to create an XML file to reference from the command line. Once in the GUI app, click on the Settings icon. Click on Update Filter. Under Recommendation Level, I checked everything. Under Update Type, I checked Application Software. Everything else is left unchecked. Configure every other settings tab the way you want. Now click on Import/Export and click Export. Export the XML to the desired UNC path in which the one-liner below can access. You can also download the XML file I use from my GitHub site.

As for the one-liner below, update the <UNC Path> to the location where the Applications.XML file is located. It does not need to be called Applications.XML. That was my choice.


 powershell.exe -command "&{If ((Test-Path 'C:\Program Files\Dell\CommandUpdate\dcu-cli.exe') -eq $true) {$ExitCode = (Start-Process -FilePath 'C:\Program Files\Dell\CommandUpdate\dcu-cli.exe' -ArgumentList '/policy \\<UNC Path>\Applications.xml' -Wait -PassThru).ExitCode} elseif ((Test-path 'C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe') -eq $true) {$ExitCode = (Start-Process -FilePath 'C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe' -ArgumentList '/policy \\<UNC Path>\Applications.xml' -Wait -PassThru).ExitCode};Exit ($ExitCode)}"  

Putting this into MDT or SCCM is easy. Once you have the one-liner customized and tested, copy and paste it into a Run Command Line task sequence as shown below. That is all it takes to implement this.


0 comments:

Post a Comment