Skip to content

Add new Microsoft.Windows/WindowsFeatureList resource#1541

Draft
Gijsreyn wants to merge 5 commits into
PowerShell:mainfrom
Gijsreyn:gh-1540/main/add-windowsfeaturelist-resource
Draft

Add new Microsoft.Windows/WindowsFeatureList resource#1541
Gijsreyn wants to merge 5 commits into
PowerShell:mainfrom
Gijsreyn:gh-1540/main/add-windowsfeaturelist-resource

Conversation

@Gijsreyn
Copy link
Copy Markdown
Collaborator

PR Summary

Add new Microsoft.Windows/WindowsFeatureList resource, including whatIf support.

Note

In an earlier pull request, the rename was removed from the struct. To keep it consistent, I also removed it from the registry library.

PR Context

Fixes #1540.

Copilot AI review requested due to automatic review settings May 22, 2026 08:34
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new Rust-based DSC v3 resource for managing Windows Features via the DISM API, including schema/manifest wiring and Pester tests.

Changes:

  • Introduces Microsoft.Windows/WindowsFeatureList resource manifest + build/workspace registration.
  • Implements DISM-based get/set/export operations (including what-if and wildcard filtering for export).
  • Adds Pester tests covering get/set/export and what-if behaviors.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
resources/windows_feature/windows_feature.dsc.resource.json Defines the DSC v3 resource manifest and embedded JSON schema for WindowsFeatureList.
resources/windows_feature/src/main.rs Implements CLI entrypoint and argument parsing for get/set/export operations.
resources/windows_feature/src/dism.rs Adds dynamic DISM API loading and feature operations (get, enable, disable, enumerate).
resources/windows_feature/src/get.rs Implements resource get operation over DISM feature info.
resources/windows_feature/src/set.rs Implements resource set operation, what-if metadata, and restart-required metadata emission.
resources/windows_feature/src/export.rs Implements export with optional filters and wildcard matching optimization.
resources/windows_feature/src/types.rs Defines serializable types for input/output and filter matching logic.
resources/windows_feature/src/util.rs Adds DISM state mapping and wildcard/exact filter helpers.
resources/windows_feature/locales/en-us.toml Adds localized strings for errors and what-if messages.
resources/windows_feature/Cargo.toml Declares the new Rust crate/binary for the resource.
resources/windows_feature/.project.data.json Registers the resource for packaging/copying the manifest.
resources/windows_feature/tests/windows_feature_get.tests.ps1 Adds Pester tests for get behavior and validation.
resources/windows_feature/tests/windows_feature_set.tests.ps1 Adds Pester tests for set behavior, idempotency, and validation.
resources/windows_feature/tests/windows_feature_export.tests.ps1 Adds Pester tests for export behavior and filtering (including wildcard).
resources/windows_feature/tests/windows_featurelist_whatif.tests.ps1 Adds Pester tests for what-if behavior asserting no mutation + metadata.
lib/dsc-lib-registry/src/config.rs Aligns Metadata serialization to camelCase without explicit rename on what_if.
data.build.json Registers the new resource artifacts for build/package output.
Cargo.toml Adds the new crate to workspace members/default-members and Windows group.

Comment thread resources/windows_feature/src/dism.rs Outdated
Comment thread resources/windows_feature/src/dism.rs
Comment thread resources/windows_feature/src/export.rs
Comment thread resources/windows_feature/src/types.rs
@Gijsreyn Gijsreyn marked this pull request as draft May 22, 2026 13:16
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.

New resource: Microsoft.Windows/WindowsFeatureList for Windows Server roles

2 participants