Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Jan 13, 2026

PR Summary

Add DSCv3 resource for WindowsUpdate, supports get, set, and export. Type is Microsoft.Windows/UpdateList which implies that you're working with an array of updates. For get you must provide either title (exact match) or id to an update and same for set to work. export will accept wildcards for the title as a filter. Multiple properties in an export input object will be treated as logical AND while multiple objects in the export input is treated as logical OR.

When using get or set, if all the input objects do not result in a match to an update, then that is an error. When using export and any input filter does not match an update, that is an error.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a new DSCv3 resource for Windows Update management with support for get, set, and export operations. The resource type is Microsoft.Windows/UpdateList and uses Windows Update Agent COM APIs to query and manage updates.

Changes:

  • Added WindowsUpdate resource written in Rust with full implementation of get, set, and export operations
  • Added comprehensive test coverage across multiple test files covering schema validation, executable behavior, and all three operations
  • Updated build configuration files (Cargo.toml, build.data.json) to include the new resource

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
windowsupdate.dsc.resource.json Resource manifest defining the schema and operations for Windows Update management
src/main.rs Entry point handling CLI arguments and routing to appropriate operation handlers
src/windows_update/types.rs Type definitions for UpdateInfo, UpdateList, and helper functions for COM interop
src/windows_update/get.rs Get operation implementation with exact match filtering and AND logic
src/windows_update/set.rs Set operation implementation for installing updates with validation
src/windows_update/export.rs Export operation implementation with wildcard support and OR logic between filters
src/windows_update/mod.rs Module structure exposing the three operation handlers
tests/*.tests.ps1 Comprehensive test suites covering schema, executable, and all operations
README.md Documentation explaining usage, features, and implementation details
Cargo.toml Workspace configuration adding WindowsUpdate to build members
build.data.json Build configuration registering the new resource
.project.data.json Project metadata for the WindowsUpdate resource
Cargo.lock Dependency lock file with windows crate additions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteveL-MSFT SteveL-MSFT marked this pull request as ready for review January 14, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant