This PowerShell project automates remote execution of the Dell Command Update (DCU) CLI tool across multiple Dell computers in a network. It uses parallel processing and configuration-driven commands for remote updates. Please note that the current version has been refactored in accordance with the Refactored Proposal. Refer to it for more details.
- Remote DCU Execution: Runs Dell Command Update CLI remotely on networked Dell computers.
- Parallel Execution: Uses PowerShell runspaces for parallel updates, with each computer being assigned its own tab.
- Dynamic Configuration: Driven by user-friendly configuration files (
config.txt). - GitHub App Updates: Authenticates via a GitHub App (Device Flow) and self-updates from the latest GitHub release (supports rollback by tag).
- Detailed Logging: Per-host logs for execution outcomes and errors.
- DNS and Error Validation: Validates DNS/IP before execution.
- PowerShell 7+ (required for parallel processing, current project runs on 7.5.2)
- Dell Command Update CLI (
dcu-cli.exe) (must be installed on each target) - PsExec (Sysinternals Suite) (for remote command execution)
- .NET Desktop 9.0+ (needed for WPF to run with the current packaged version)
- Windows Admin Access (for remote access)
- GitHub App Access (to allow your team to sign in via Device Flow and receive updates from your org's GitHub Releases)
- All Prerequisites must be installed or acquired before using DONUT.
- Review Step 2 to set up PsTools, otherwise skip to Step 3 if already installed.
- PsTools is available at
https://learn.microsoft.com/en-us/sysinternals/downloads/pstools. - Extract the zip to Documents, Downloads, or Desktop (any one of these directories will suffice).
- Transfer the contents of the folder to
C:\Windows\System32.
- PsTools is available at
- Run the .NET Desktop SDK installer (available at
https://dotnet.microsoft.com/en-us/download/dotnet/9.0). - Install DONUT (MSI available under releases).
- Navigate to Virus & Threat Protection > Manage Settings > Add or remove exclusions (this is NOT a virus, just not digitally signed).
- Click Add an exclusion.
- Select Folder.
- Enter
C:\Program Files\Bakery\DONUT.
-
Launch the Application:
- Open the app through the Start Menu.
- On first launch (or if the token expired), sign in with your GitHub App using the device code prompt so the updater can pull releases.
- Apply any updates if prompted (unless specified otherwise by the team).
-
Configure Commands:
-
Use the Config tab in the UI to select and configure DCU commands and options.
-
For more information on "Text Option" parameters, see DCU-CLI Documentation for more details.
Note: If a main command is run with no options from the
Dropdown/Multi-Select Optionsselected, then DCU will use the target machine's defaults.
-
-
List Target Computers:
- Enter the target hostname(s) in the search bar, separated by commas or new lines.
- The UI will display a tab for each computer and manage the queue automatically.
-
Run and Monitor:
- Click the search button (button with command name, i.e., ApplyUpdates or Scan) to start.
- Progress and logs are shown in real time in each computer's tab.
- Manual reboot prompts and update confirmations are handled via popups in the UI.
Note: If you disconnect from the network while updates are running, they will continue, you will just lose access to the live feed.
-
Review Logs:
- Detailed logs are saved in the logs tab for each run (if specified).
- If a file path is specified in "Output Log", a tab in its name will be appended under the Logs page.
- If no file path is specified, the "Default" tab will be appended to if any errors with the run are detected.
- For example, if the "Output Log" was set to
C:\temp\DONUT\applyUpdates.log, new data will be appended to the ApplyUpdates tab.
- For example, if the "Output Log" was set to
- Clone the repository and open in VS Code or PowerShell Studio.
- Install dependencies (see Prerequisites).
- Review configuration files and XAML UI files in
Views/andStyles/. - Package and publish updates via GitHub Releases.
- Build the MSI with Visual Studio's packager (set the Product Version to your release tag).
- Create a GitHub release with that tag and upload the MSI asset (matches
MsiAssetPattern, default*.msi). - The app authenticates via your GitHub App (Device Flow), compares the installed version to the latest release tag, and self-updates or rolls back accordingly.
- Runspaces: Used for parallel remote execution, runspace management, and UI updates.
- WPF UI: All user interaction is via the XAML-based interface and supporting presenter modules.
- Execution Policy: Set to
BypassinStartup.pssfor development and packaging convenience. - GitHub App Updates: Requests a GitHub Device Flow token, fetches the latest release, verifies the MSI SHA-256.
- UI Changes: Edit XAML files in
Views/andStyles/. - Logic Changes: Update event logic in the respective
Core/orService/directories, with each page's supporting function(s) in its relevant module file. - Deploying Changes:
- Build a new MSI in PowerShell Studio (update the Product Version).
- Draft a GitHub release with a tag matching that version and upload the MSI asset (honor
MsiAssetPatternif you rename it). - Org admins sign in once via the GitHub App; the app will pick up the latest release on startup and prompt users to update or roll back based on the tag.
- Optional:
- Repackage the project in PowerShell Studio with the new version (i.e., 1.0.0.4) and build the MSI.
- Keep a copy of the MSI on the internal file share for manual installs or recovery.
- Remote Only: Designed for remote execution; local runs can behave unexpectedly.