Skip to content

docs: Add dism_dsc reference documentation#1527

Merged
SteveL-MSFT merged 1 commit into
PowerShell:mainfrom
Gijsreyn:add-dismdsc-docs
May 19, 2026
Merged

docs: Add dism_dsc reference documentation#1527
SteveL-MSFT merged 1 commit into
PowerShell:mainfrom
Gijsreyn:add-dismdsc-docs

Conversation

@Gijsreyn
Copy link
Copy Markdown
Collaborator

PR Summary

This pull request adds reference documentation for the dism_dsc executable for Windows. Each resource contains 3 examples for users to get started easily.

Copilot AI review requested due to automatic review settings May 10, 2026 06:25
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

This PR adds new reference documentation pages for the Windows DISM-backed DSC resources provided by dism_dsc, including detailed property descriptions, instance schemas, and example walkthroughs to help users get started.

Changes:

  • Added resource reference docs for Microsoft.Windows/OptionalFeatureList and Microsoft.Windows/FeatureOnDemandList.
  • Added three example pages per resource covering get, set, and export usage patterns.
  • Documented resource properties, valid values, exit codes, and provided embedded JSON schema snippets.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md New reference page describing OptionalFeatureList capabilities, properties, schema, exit codes, and links to examples.
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md New “get” examples for OptionalFeatureList (single/multiple/non-existent feature).
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md New “export” examples for OptionalFeatureList (all/filtered/full details).
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md New “set” examples for OptionalFeatureList (enable/disable/remove + config document usage).
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md New reference page describing FeatureOnDemandList capabilities, properties, schema, exit codes, and links to examples.
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md New “get” examples for FeatureOnDemandList (single/multiple/non-existent capability).
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md New “export” examples for FeatureOnDemandList (all/filtered/full details).
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md New “set” examples for FeatureOnDemandList (install/remove + config document usage).

@michaeltlombardi
Copy link
Copy Markdown
Collaborator

Starting editorial pass, will be updating the commit directly and force pushing when completed. Please don't make any changes to this PR while I'm actively editing the documentation. Thank you!

Comment on lines +47 to +51
> [!NOTE]
> When exporting without filters, the resource uses a fast enumeration path that returns only
> `identity` and `state` for each capability. To retrieve additional properties such as
> `displayName`, `description`, `downloadSize`, and `installSize`, use an export filter as shown
> in the examples below.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not to resolve in this PR, but this is also behavior we should reconsider for the next release - the expected behavior for get and export is to return all known data for an instance without requiring resource-specific steps.

If we wanted to support a limited data mode, we should define a write-only property that tells the resource to minimize the return data - this behavior should be opt-in, not opt-out.

Also, these fields (displayName, description, etc) should be marked as read-only in the JSON Schema since they aren't configurable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@michaeltlombardi can you open an issue to discuss what pattern we should define for resources? In this specific case, every property is a remote call so it's SUPER slow.

Comment on lines +172 to +175
Indicates whether the capability exists on the system. The resource sets this property to `false`
in the **Get** response when the requested `identity` is not recognized by DISM. When `_exist` is
`false`, the `state`, `displayName`, `description`, `downloadSize`, and `installSize` properties
are not returned.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Design note: This implementation is non-canonical - the _exist canonical property should only be used to indicate/define whether a resource instance actually exists on the system.

We could pretty readily map this to install/uninstall for this resource and make state read-only.

Otherwise we should consider removing this property. If the desired capability doesn't exist we probably want to raise an error.

Comment on lines +149 to +154
The identity string that uniquely identifies the Windows capability. For **Get** and **Set**
operations, this property is required for each entry. For **Export** operations, it's optional and
supports wildcard (`*`) patterns for case-insensitive filtering.

Capability identities typically follow the format `CapabilityName~~~~LanguageTag~Version`, for
example `OpenSSH.Client~~~~0.0.1.0` or `Language.Basic~~~en-US~0.0.1.0`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Design note:

For the next release, we may want to consider updating the resource implementation to separate identity into name, languageTag, and version - which we concatenate for the user before handing off to the API.

As-is, this is very difficult to parse and reason about. It also requires the user to know the exact string, which may be different across operating system versions.

This resource serves a similar purpose to PsdscResources\WindowsFeature but with a much less intuitive resource instance API.

Looking through this implementation I think we probably want to review the design for this resource all-up before our next release.

Copy link
Copy Markdown
Collaborator

@michaeltlombardi michaeltlombardi left a comment

Choose a reason for hiding this comment

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

Completed editorial review, ready for final technical review and merge.

@Gijsreyn
Copy link
Copy Markdown
Collaborator Author

Thanks Mikey!

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue May 19, 2026
Merged via the queue into PowerShell:main with commit ce70909 May 19, 2026
1 check passed
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.

4 participants