windows-powershell-docs icon indicating copy to clipboard operation
windows-powershell-docs copied to clipboard

Conflicting DISM Wildcard Behavior and Documentation

Open tablackburn opened this issue 6 months ago • 2 comments

Prerequisites

  • [x] Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • [x] Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • [x] Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

  • https://learn.microsoft.com/en-us/powershell/module/dism/get-windowscapability

Summary

The Get-WindowsCapability documentation states that the -Name parameter does not accept wildcards, but the cmdlet does accept wildcards for the -Name parameter.

Expected

PS C:\> Get-WindowsCapability -Online -Name '*rsat*' | Format-Table -AutoSize

No results, or an error/warning

Actual

PS C:\> Get-WindowsCapability -Online -Name '*rsat*' | Format-Table -AutoSize

Name                                                          State DisplayName
----                                                          ----- -----------
Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0             NotPresent RSAT: Active Directory Domain Services and Lightwe…
Rsat.AzureStack.HCI.Management.Tools~~~~0.0.1.0          NotPresent RSAT: PowerShell module for Azure Stack HCI

I suspect this is also true of other DISM cmdlets, although I haven't done a thorough investigation.

Details

No response

Suggested Fix

I believe the documentation is automatically generated, so the source code probably just needs to be updated to signify that the parameter accepts wildcards.

tablackburn avatar May 22 '25 22:05 tablackburn

This repository is for PowerShell core documentation. Source for that article is located at https://github.com/MicrosoftDocs/windows-powershell-docs/blob/main/docset/winserver2025-ps/Dism/Get-WindowsCapability.md.

sdwheeler avatar May 23 '25 13:05 sdwheeler

I transferred this issue to the proper repository.

sdwheeler avatar May 23 '25 13:05 sdwheeler