Get-Process DellCommandUpdate -ErrorAction SilentlyContinue |Stop-Process -Force cmd /c 'C:\Program Files\Dell\CommandUpdate\dcu-cli.exe' /configure -updatetype='bios,firmware,driver' -maxretry=2 Start-Process -WindowStyle hidden -filepath $DCU_exe -ArgumentList "/applyUpdates -silent -reboot=disable -outputlog=$DCU_report" -Wait cmd /c "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /configure -restoreDefaults cmd /c "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /configure -updatesNotification=disable this is what i use...we uninstall DCU, reinstall, then run this (DCU used to freeze constantly, reinstall seemed to help not sure if its still a thing.) i push this out with our monthly patches so the reboot should get taken care of...its not perfect but it does the trick and i dont have to maintain up to date drivers I just let DCU handle it. Answer from ObeseGymnast on reddit.com
🌐
Reddit
reddit.com › r/sysadmin › install all available updates via dell command update cli commands?
r/sysadmin on Reddit: Install all available updates via Dell Command Update CLI commands?
April 10, 2024 -

Hi Everyone,

We’re using Dell Command Update to push our Drivers and BIOS updates.

Instead of waiting for the updating to automatically trigger, When I used the /ApplyUpdates option it only really installed a handful of what is available in my catalogue. Skipping among many things the BIOS update.

I was wondering if there is an option to just install everything available in the catalogue?

Thanks everyone!

Top answer
1 of 5
6

I run this as an application towards the end of the TS then reboot with MDT and run it again followed by another reboot before finishing up the whole TS.

@echo off
TITLE Running DELL Command Update...
REM Checks for updated DELL Drivers using DELL Command Update CLI

"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /configure -silent -autoSuspendBitLocker=enable -userConsent=disable
"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /scan -outputLog=C:\dell\logs\scan.log
"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /applyUpdates -reboot=disable -outputLog=C:\dell\logs\applyUpdates.log

It's pretty self explanatory but it configures it first, does a scan, then applies the updates and disables reboot so that MDT can do it instead. I run this against DCU 4.1.

I don't recommend silencing the Apply Updates stage (it isn't in that script above) because sometimes it can take a little while and not being able to see what it's doing can be nerve racking.

2 of 5
3

Update: Not sure if this was recent but you must now remove the (x86) out of the Program Files path (maybe they made the app x64 now?)

Here's a script I made that works really well. Of course you can tailor it for a GPO but standalone, it works wonders.

The gist is.. it will check if Dell Command Update is installed and if it is, it will run it and install all available updates. If it's not installed, it will look for the Dell Command Update msi and silently install it and then run it silently. If it cannot find the msi automatically, it will prompt you with an explorer GUI to browse to the .msi and silently install/run it.

Esentially.. a single click to do all Dell updates. It's also turning off Dell automatic update (handy for enterprise/small business) but you can delete/comment that out. In order to get the .msi you can run the Dell Command Update tool and in the middle of it running, you can find it in the Windows temp directory and copy it out of their and put it on a network share or USB stick for mass deployment.

@echo off
cls

tasklist | find /i "DellCommandUpdate.exe" && echo Closing existing Dell Command Update && taskkill /im DellCommandUpdate.exe /F
SET file=S:\Downloads\DellCommandUpdate.msi
if exist "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" goto:runDellUpdater
if exist "%file%" goto:installDellUpdater

echo Please navigate to the DellCommandUpdate.msi file
set dialog="about:<input type=file id=FILE><script>FILE.click();new ActiveXObject
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);</script>"
for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p"

:installDellUpdater
echo Installing Dell Command Update app
"%file%" /quiet

:runDellUpdater
echo Disabling Dell automatic updates
REG ADD "HKLM\SOFTWARE\Dell\UpdateService\Clients\CommandUpdate\Preferences\Settings\Schedule" /v "ScheduleMode" /t REG_SZ /d "ManualUpdates" /f
echo Running the Dell Command Update app
"C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /ApplyUpdates
pause
🌐
Reddit
reddit.com › r/sysadmin › dell command 3.1 cli
r/sysadmin on Reddit: Dell Command 3.1 CLI
February 3, 2020 -

I am trying to write a script to install on specific Dell Command updates. I am not sure which -updateType options to use as the values. Does Dell have a list of updateType options the the CLI will accept? I know bios works but not sure how to enter the other update types.

u/ECHO OFF

::Check OS

IF EXIST "%ProgramFiles(x86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)

:64BIT

"C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /configure -scheduleMonthly=3,09:15 -scheduleAction=DownloadInstallAndNotify -updateType=bios -userConsent=disable -autoSuspendBitLocker=Enable -outputlog="C:\update.log" -silent

GOTO End

:32BIT

"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /configure -scheduleMonthly=3,09:15 -scheduleAction=DownloadInstallAndNotify -updateType=bios -userConsent=disable -autoSuspendBitLocker=Enable -outputlog="C:\update.log" -silent

:End

🌐
Reddit
reddit.com › r › sysadmin › comments › arvgsz › dell_command_dcu_24_dcucliexe_and_graphics_driver
r/sysadmin - Dell Command / DCU 2.4 (dcu-cli.exe) and graphics Driver Update
February 18, 2019 -

Hi there,we want to simplify our Driver Management with Dell Command/DCU...so we played a bit along and tried to install "blank" Windows 10 on our Latitudes (7480 + E7470), after this we deployed Dell Command/DCU 2.4 (https://www.dell.com/support/article/de/de/debsdt1/sln311129/dell-command-update?lang=en)

So we`ve downloaded the following repositoryhttps://www.dell.com/support/home/de/de/debsdt1/Drivers/DriversDetails?driverId=9RX9M

Seems fine so far, we let run the following command"C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /silent /driverRestore "%SRC%\E7470-win10-A11-F4MTJ.CAB" /log "C:\Program Files (x86)\Dell\CommandUpdate\Driver Restore log"There are no Errors in the log, other (missing) drivers are installed fine but not the graphics Driver. When we extract the *.cab and install the graphics Driver manually it works.

Any ideas how to fix this?

🌐
Reddit
reddit.com › r/sccm › dell command update in task sequence
r/SCCM on Reddit: Dell Command Update in Task Sequence
February 2, 2024 -

Struggling to get DCU to run during the TS. Below is what my setup looks like (took these from someone elses post). Using DCU 5.1.0. I can briefly see the cmd window open during the TS but it quickly closes. What am I doing wrong?

Step name: Dell Driver Install (x64)

Run Command Line:

cmd.exe /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /driverInstall -reboot=disable -outputLog=C:\DellDriversDuringImaging.log

Step name: Restart Computer to OS

Step name: Dell Update Install (x64)

Run Command Line:

cmd.exe /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /ApplyUpdates -updatetype=BIOS,firmware,driver -reboot=disable -outputLog=C:\DellUpdatesDuringTS.log

🌐
Reddit
reddit.com › r/intune › dell command update
r/Intune on Reddit: Dell Command Update
January 21, 2021 -

Hi guys,

So am trying to deploy this tool by using this video:

https://www.youtube.com/watch?v=yoIN6DXYWRA&feature=youtu.be

Everything works fine except for the fact that on the device the app has default values only, not the ones I have changed prior to exporting the .xml

Did any of you work with this tool and can assist? Thanks.

EDIT:

Managed to fix the issue by running a PS script as a custom detection script with the following arguments:

New-ItemProperty -Path Registry::"HKLM\SOFTWARE\Dell\UpdateService\Clients\CommandUpdate\Preferences\CFG" -Name "ShowSetupPopup" -PropertyType "DWORD" -Value "0" -Force

Start-Process "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/configure -lockSettings=enable" -NoNewWindow -Wait

Start-Process "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/configure -scheduleAuto" -NoNewWindow -Wait

Start-Process "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/configure -userConsent=disable" -NoNewWindow -Wait

Start-Process "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/configure -scheduleAction=DownloadInstallAndNotify" -NoNewWindow -Wait

Edit 2:

Having an issue with 3 devices that offer exit code 1602, but the users didn't cancel the instalation.

Edit 3:

Found out the reason. It was because either Dell Support Assist or Dell Updater was installed on the target machine. So if you are trying this, make sure to uninstal first.

🌐
Reddit
reddit.com › r/powershell › need help with running command line...commands in powershell
r/PowerShell on Reddit: Need Help with running Command Line...Commands in Powershell
April 26, 2024 -

Not sure if this is the right place for this post, debated between this and r/sysadmin.

Ive been working on a script that our client requested that uses the Dell Command Update (DCU) CLI to run a script that updates the user's drivers/bios/firmware via proactive remediation. Ive managed to get that built out and tested and it works flawless. Since then they added a stipulation in the project, the CLI gives exit codes and for certain codes that basically says "reboot required". If this code were to appear they want a notification sent to the user letting them know to reboot.

Not that hard I thought, setup switch statements that looks for the various exit codes, but im getting stumped on the actual notification. I managed to get a Windows Toast notification setup but it does not work via Proactive Remediation since its running in SYSTEM context instead of USER. I did some digging and found that the DCU CLI tool has a command to push a notification to the user.

Thats where im currently at, ill post my code and conundrum below.

Here is a one line command using the CLI tool that sends a notification to the user at a specific time:

&"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /customnotification -heading="Which one is this" -body="Update FOund" -timestamp="4/26/2024,13:55" 

This confirm works, but obviously I cant hard code a time because not all computers will run the script at the same time.

So i thought i found the solution below:

$notiDate = (get-date).ToString("MM/dd/yyyy,HH:mm")
&"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /customnotification -heading="I am heading" -body="I am body" -timestamp="$notidate"

I thought this would work, it puts today's date/time in the exact format that the CLI tool requires but i get an error saying that the parameter is invalid everytime. It makes no sense to me, is that not the same format as the previous line of code???

Can anyone help a poor helpdesk worker out? Im sure its something simple im missing, but im up for any suggestion even ones that dont involve the CLI tool and use some other form of Windows Notification that runs in SYSTEM context without fail. I just need a way of alerting users to reboot their dang computer lol

ps. Heres a link to the CLI reference guide: https://www.dell.com/support/manuals/en-us/command-update/dellcommandupdate_rg/dell-command-update-cli-commands?guid=guid-92619086-5f7c-4a05-bce2-0d560c15e8ed&lang=en-us

Find elsewhere
🌐
Reddit
reddit.com › r/sysadmin › simple question: how i pass the password to dcu-cli.exe in order to apply updates
r/sysadmin on Reddit: Simple question: How I pass the password to dcu-cli.exe in order to apply updates
January 7, 2024 -

Hello to all,

probably mine is a problem related to different mothertongue,but I'm trying to do the most simple and plain operation, I have to execute the bios update on a bunch of Dell devices that ALREADY have an admin password on the BIOS, from GUI you just type the psw, when using DCU-CLI.EXE how the h*ll I have to pass the password??

righ now I'm using this:

$Password = Invoke-RestMethod -Uri $apiUrl -Method Get

Start-Process -Wait -FilePath dcu-cli.exe -ArgumentList "/configure -scheduleManual -autoSuspendBitLocker=enable -biosPassword=$Password -downloadLocation=$UpdatesFolderPath"

$Updates = Start-Process -FilePath dcu-cli.exe -ArgumentList "/applyUpdates -reboot=disable -outputLog=$UpdatesLog" -PassThru -Wait

I'm collecting the password from an Azure Key Vault thru an Azure Function, the variable $Password will contains the plain text psw.

but seems it doesn't work, the -biosPassword is the right attribute? there is something I miss? I just want to pass the already configured password value without changing it, anyone could clarify the code syntax error?

🌐
Reddit
reddit.com › r/dell › dell command update client: the command dcu-cli.exe /configure errors out on 3005 "installing pending updates"
r/Dell on Reddit: Dell Command Update Client: The command DCU-cli.exe /configure errors out on 3005 "Installing pending updates"
October 4, 2024 -

Hello!

I'm trying to install Dell Command Update client on my fleet of laptops and apply configuration where it locks the GUI and changes the check updates setting schedule to 'manual' (instead of being automatic) with the following powershell script:

Start-Process -filepath Dell-Command-Update-Application_6VFWW_WIN_5.4.0_A00.EXE -ArgumentList '/s /l=C:\Windows\Logs\install.log' -wait

Start-Process -filepath dcu-cli.exe -ArgumentList '/configure -userConsent=disable -scheduleManual' -wait

This script generally works across the majority of our laptops for the most part.

However, there is a small number of laptops that do not execute the second command to apply the dcu-cli.exe /configure step. The DCU-cli.exe errors out on code 3005 which translates to "The Dell Client Management Service is installing pending updates."

This error only happens on these machines when you string the two commands together. If you immediately launch another shell and run the second script manually, it applies the config no problem. I don't know what it is about having the two commands being strung together on some particular laptops that it returns this error code. I've tried inserting a step in between to restart the dellclientmanagement service, but it has no affect. Only launching another separate shell afterwards to apply it seems to work.

Has anyone encountered this before?

Much appreciated if anyone has any advice

Thanks!

🌐
Reddit
reddit.com › r/msp › dell command update 4.4 issues (4.0 in general)
r/msp on Reddit: Dell Command Update 4.4 issues (4.0 in general)
November 19, 2021 -

I discovered an issue today with undocumented changes that Dell has made to DCU 4.4. This has also highlighted a previous change from 3.x which wasn't noticed before.

We execute dcu-cli.exe from our RMM via a script. During the install of DCU, we were sanitizing the configuration to make sure it was configured as we wanted and it did not prompt the user for any updates as we manage all of it via the RMM scripting. We ran the following line:

dcu-cli.exe /configure -restoreDefaults -scheduleManual -scheduledReboot=0

In the documentation for 3.x, the -scheduledReboot=0 disables DCU from rebooting the system after installing updates. If we deploy updates via DCU through the RMM, we want to control when the reboots are executed and not leave it up to DCU itself. This has worked fine from DCU 3.1 - 3.1.3.

According to the documentation for 4.x, the -scheduledReboot parameter can now only take values of 5,15,30, and 60 minutes. It can no longer be set to 0 to disable this. Since the automation for 3.1 had been set up two years ago, and appeared to work with 4.0, I didn't dig into the change very deeply.

Today however, I discovered a change in 4.4 that is now causing problems. With version 4.3 and prior, any command line values not recognized were simply ignored. So in the example command above, DCU would still apply the -restoreDefaults and -scheduleManual as these were valid commands. -scheduleReboot=0 would be ignored as this is no longer recognized. With the 4.4 release, the entirety of the command line is ignored if any of the arguments are incorrect, so now the manual schedule is no longer being honored, so DCU is now using default values and prompting users for updates which is causing them confusion.

I've opened a ticket with Dell about the lack of ability to disable reboots via DCU as well as the changes on parsing command line arguments with no mention of this change in any of the release notes.

If you have any automation in place, make sure you check that all of your commands are valid as of DCU 4.4, DCU now ignores the entirety of the command if any values are no longer valid due to changes by Dell to the command line interface.

🌐
Reddit
reddit.com › r/sccm › dell command update - return code 2
r/SCCM on Reddit: Dell Command Update - Return Code 2
September 16, 2022 -

I'm tearing my hair out on this one.

Windows 10 - 21H2 x64 (Enterprise, if it matters), installing DCU with PSADT, and this works fine:

Execute-Process -Path 'DCU_Setup_4_6_0.exe' -Parameters "/S /v/qn"

I've even rebooted after this install just to be sure. However in any case, having SCCM try and either import our config XML, or run any "/configure" command fails with return code 2. I've run it with cmd, with start, by calling dcu-cli directly, and any combination you can think of and it doesn't work.

It does log:

Execute-Process -Path "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" -Parameters '/configure -importSettings=C:\Temp\xxxx-DCU-v2.xml -silent -outputLog=C:\Temp\DCU.log'

But no matter what (log here https://pastebin.com/0HQuzYyJ ) we're always seeing:

[2022-09-15 23:19:07] : An error occurred while executing the provided CLI command. 
[2022-09-15 23:19:07] : The program exited with return code: 2 

Even though it claims it changes the settings it doesn't.

Anyone have any clue what's up? This is too simple to fail and I've been banging on this for a few days.

Edit: 4.5.0 works, but it's missing the restart deferral options and also allows a user to disable automatic updates on first launch of the GUI even after locking settings. Ugh. Dell.....

Edit2: We gave up, are doing 4.6.0 and just rawdogging the settings in the registry with PSADT:

https://pastebin.com/YNCWf8eg

Top answer
1 of 5
4
I am struggling withe the exact same issue. The importSettings parameter fails with exit code 2. Even after I added a 30 second wait, it still fails the import of the xml. This started failing with version 4.6.0... But if I run the exact same script locally, not via Software Center, the import completes just fine. Any suggestions?
2 of 5
4
Interesting to read something regarding my EXACT problem. PSADT, SCCM and DCU exit code 2! This is an issue with many, but not all, DCU versions. 4.1 and 4.5 worked but not 4.2-4.4 and 4.6-4.7 (which also turned into an UWP app). We got around almost every problem by inserting all settings directly into the registry with PSADT:s Set-RegistryKey, as everything is stored within HKEY_LOCAL_MACHINE\SOFTWARE\Dell\UpdateService\Clients\CommandUpdate\Preferences it's really easy. The only thing we couldn't get into the registry was the BIOS password since its scrambled and different on every machine. I tried just running the "dcu-cli.exe /configure -biosPassword" command via Execute-Process in PSADT but that resulted in exit code 2 too. As did creating a scheduled task running the command as SYSTEM. And, as many have stated, running the command as SYSTEM in cmd or PS works fine...speachless! But, I ended up testing running the dcu-cli command in a Task Sequence and, voila, it worked! So no i have a DCU 4.7 application installing DCU and inserting settings in registry. Then a TS running the dcu-cli command with an if statement under the Options tab to only run if dcu-cli.exe exists and the registry key BiosPassword doesn't. Then I have deployed it required to the DCU 4.7 collection to run every Wednesday, in case it decides to go away in any future update.
🌐
Reddit
reddit.com › r/powershell › unable to run cli utility (dcu-cli from dell) via a remote session
r/PowerShell on Reddit: Unable to run CLI utility (dcu-cli from Dell) via a Remote session
June 10, 2019 -

Hi all,

Very much a Powershell n00b, but I'm hoping someone can guide me in the right direction.

I'm wanting to utilize "Dell Command Utility" - or more importantly - its CLI part in an interactive script. (It allows you to automatically download and update a Dell PC's drivers and BIOS). I believe the issue I have is that the utility doesn't like to run 'headless' through a remote PS-Session. But I want to see the progress (as it includes download information, what's out of date, etc.).

It works locally on the machine in a tell-tale way:

  • If you run it in an elevated Command Prompt - it runs in-situ without any issue.

  • If you run in in an elevated, but local, Powershell window (directly calling the .exe or a Start-Process), it will open it's own "command-prompt-esque black and grey" CLI window.

  • If you call it in Powershell via cmd /c - it will open and run in-situ in that Powershell window - but again, only locally.

As soon as you run it in a remote session, you're greeted with:

.\dcu-cli.exe :
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Unhandled Exception:
System.IO.IOException: The handle is invalid.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at Dell.CommandUpdate.CLI.Program.ShowWorking()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback,
Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state,
Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

no matter what I've tried (so far).

So my question is - can I enforce the program to stay within the Powershell shell and stop trying to break out into another? I think this is probably the issue (please correct me if I'm wrong!) but that's way out of my depth of PS understanding.

Than you in advance for any guidance given.

🌐
Automox
community.automox.com › community hub › forum › automox worklets › find & share worklets › basic dell command update worklet
Basic Dell Command Update Worklet | Community
November 29, 2023 - $software = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -NoProfile -NonInteractive -Command $scriptblock ... $results = Start-Process -FilePath "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/configure -$Arg" -Wait | Out-Null