Try running it this way. You should be able to see any output or error messages. I typically add to the path first rather than using & or start-process.
invoke-command mycomputer {
$env:path += ';C:\Program Files (x86)\Dell\CommandUpdate';
dcu-cli /applyUpdates -autoSuspendBitLocker=enable -outputLog=C:\Dell_Update.log }
Using start-process inside invoke-command seems pretty challenging. I can't even see the output of findstr unless I save it to a file. And if I didn't wait the output would be truncated. By default start-process runs in the background and in another window. There's a -nonewwindow option too but it doesn't help with invoke-command.
invoke-command localhost { # elevated
start-process 'findstr' '/i word c:\users\joe\file1' -wait -RedirectStandardOutput c:\users\joe\out }
Answer from js2010 on Stack OverflowI'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
windows - PowerShell Invoke-Command with Start-Process outputs different result - Stack Overflow
powershell - Using PSRemoting to Install Dell Updates using dcu-cli.exe - Stack Overflow
Inspiron 7791, running Dell Command Update returns Exitcode 2
Pass exit code from dcu-cli.exe to PSADT v4
Try running it this way. You should be able to see any output or error messages. I typically add to the path first rather than using & or start-process.
invoke-command mycomputer {
$env:path += ';C:\Program Files (x86)\Dell\CommandUpdate';
dcu-cli /applyUpdates -autoSuspendBitLocker=enable -outputLog=C:\Dell_Update.log }
Using start-process inside invoke-command seems pretty challenging. I can't even see the output of findstr unless I save it to a file. And if I didn't wait the output would be truncated. By default start-process runs in the background and in another window. There's a -nonewwindow option too but it doesn't help with invoke-command.
invoke-command localhost { # elevated
start-process 'findstr' '/i word c:\users\joe\file1' -wait -RedirectStandardOutput c:\users\joe\out }
@js2010, thanks for your additional help. Unfortunately this didn't helped either.
So i did some more debugging and it turns out it was a bug in the dcu-cli version running on my test machine, DOH...!!
On the test machine version 3.1.1 was running and on another machine version 4.0 was running and that worked fine via remote Powershell. So i looked for the release notes, which i found here: https://www.dell.com/support/kbdoc/000177325/dell-command-update
And as you can see in version 3.1.3 there was this fix:
A problem was solved where dcu-cli.exe was not executed in an external interactive session of PowerShell.
For some reason when I install this via TS, it's only installing the command line dcu-cli with no gui. Also, when I run
cmd.exe /c start /wait C:\"Program Files"\Dell\CommandUpdate\dcu-cli.exe /ApplyUpdates
via TS I can watch it download and apply some updates, but it was failing to install the latest firmware and bios.
I'm having to install the bios and schedule a reboot before pushing out any software..I then have it install DCU, run, restart into the OS and STILL our touchscreen and touchpad aren't working until we log in and run another windows update. At that point it installs the latest Dell Firmware as well as the drivers needed for touchscreen and touchpad.
This is with the latest latitude 5520 driver cab injected into the image.
We have various models of Dell Optiplex on the network and I'm trying to update the BIOS/drivers for all of them. I'm attempting to use PDQ to deploy Dell Command Update to accomplish this task. I've already deployed the client itself + my policy file, and am now trying to create a package that will run "dcu-cli.exe /silent /policy mypolicy.xml /log mylog".
PDQ seems to be doing its thing, and I can check the computer to ensure the dcu-cli.exe is running. However, PDQ typically ends up saying "Failed command script returned error code 1". I cannot figure out what is throwing the error code 1. By reading the log.xml file, I can see that there are some updates that require a reboot, etc. but those are giving Exit Code 2 (needs reboot).
After I run the initial dcu-cli.exe (which fails eventually), then reboot the machine, if I re-run my PDQ package, there are no errors. I don't know why its not exiting gracefully (exit code 0) and allowing me to reboot when I'm ready. Any tips? I've tried with a powershell script too, using start-process, same type of error though "powershell script returned no error code". I verified that it really is returning Exit Code 1, i just can't figure out why!!
Hello there,
The Return code of 2 generally means that a file was not found. As the Dell command update has passed through may be this might a different error message meaning in your scenario. Can you see any other Event ID being generated to narrow down the issue?
Check the bdd.log file and see what it says. Per my personal experience, unexpected code 2 usually means file not found, incorrect file path, or permissions.
The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.
https://social.technet.microsoft.com/Forums/en-US/12faf5f9-0c1a-4922-9fdf-b249ed4588fa/unexpected-return-code-2-when-installing-applications?forum=mdt
https://learn.microsoft.com/en-us/answers/questions/355159/mdt-the-application-returned-an-unexpected-code-2.html
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–
I was getting the same error code on my installation, but finding that the application was installed. After searching I found that Error Code 2 for Dell Command Update indicates that a reboot is required.
[https://blog.loftinnc.com/dell-update-package-command-line-reference-and-exit-codes
I wish there was some uniformity between vendors when it comes to error codes.
DELL Command Update version: Dell-Command-Update-Application-for-Windows-10_GRVPK_WIN_4.3.0_A00.EXE
Dell Command | Update Version 4.x Reference Guide
Steps:
- Open interactive command line interface on remote workstation
- Execute dcu-cli.exe /applyUpdates -updateType=bios,firmware,driver -autoSuspendBitLocker=enable -outputLog=C:\Temp\scanOutput.log
- Command fails with return code 500 (see log output below)
I’ve omitted all commands except /applyUpdates -updateType, but I am still getting the same result.
I can ping downloads.dell.com and dellupdater.dell.com.
I’ve attempted this on different workstations over several days.
Any help would be appreciated.
[2021-08-16 11:40:42] : The computer manufacturer is ‘Dell’
[2021-08-16 11:40:42] : Checking for updates…
[2021-08-16 11:40:43] : Checking for application component updates…
[2021-08-16 11:40:45] : Determining available updates…
[2021-08-16 11:40:45] : The scan result is DOWNLOAD_ERROR
[2021-08-16 11:40:45] : INDEX_CATALOG_FAILED_DOWNLOAD is flagged in the scan results
[2021-08-16 11:40:45] : The catalog CatalogIndexPC.cab failed to provide any result
[2021-08-16 11:40:45] : The service provided this message 'Catalog download failed [https://downloads.dell.com/catalog/CatalogIndexPC.cab] ’
[2021-08-16 11:40:45] : The service provided this message 'Catalog download failed [https://dellupdater.dell.com/non_du/ClientService/Catalog/CatalogIndexPC.cab] ’
[2021-08-16 11:40:46] : Execution completed.
[2021-08-16 11:40:46] : The program exited with return code: 500
[2021-08-16 11:40:46] : State monitoring instance total elapsed time = 00:00:04.8709729, Execution time = 9mS, Overhead = 0.194844032082379%
[2021-08-16 11:40:46] : State monitoring disposed for application domain dcu-cli.exe
This is the command I run. I just ran it on some of my computers are it works. Also using the current version. Hope this helps
"C:\Program Files\Dell\CommandUpdate\dcu-cli.exe" /applyUpdates -reboot=enable -updateType=driver,application -outputLog="c:\temp\DellCommandUpdate%dt%.log"
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
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!