Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

WindowsCapability: Specified Windows Capability not found

未关闭
#454 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
powershell

调研方向

首先,在所报告的 Windows 11 和 PowerShell 版本上,使用提供的 WindowsCapability YAML 重现 winget configure test configuration.yaml。检查 WindowsCapability 资源的行为、wiki 示例以及 winget 使用的 ComputerManagementDsc 版本,然后确认 capability 名称被拒绝的原因,以及未创建日志的原因。当受支持的配置能够使用文档中的示例正常工作,或不兼容性及所需的修正已完成文档记录时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Problem description

When trying to run winget configure test configuration.yaml (contents of the yaml file below) using the WindowsCapability resource, I get an error:

  The configuration unit failed while attempting to test the current system state.
Specified Windows Capability 'OpenSSH.Server~~~~0.0.1.0' not found. (Parameter 'Name')
<See the log file for additional details>
Some of the configuration units failed while testing their state.

I've tried it with both OpenSSH.Server and OpenSSH.Client as specified in the wiki example but I had no luck, the log file is not created either

Verbose logs
No logs were created
DSC configuration
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
  configurationVersion: "0.2.0"
  resources:
    - resource: ComputerManagementDsc/WindowsCapability
      settings:
        Name: OpenSSH.Server~~~~0.0.1.0
        LogPath: C:\Temp\Logfile.log
Suggested solution

Not sure what is the fix

Operating system the target node is running
OsName               : Microsoft Windows 11 Home
OsOperatingSystemSKU : WindowsHome
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage           : en-US
OsMuiLanguages       : {en-US, en-GB, ja-JP, ko-KR…}
PowerShell version and build the target node is running
Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
ComputerManagementDsc version
Unsure, ran using winget
主要语言
PowerShell
星标
339
派生
80
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dsccommunity/ComputerManagementDsc 的其他 Issue

查看 dsccommunity/ComputerManagementDsc 的全部 Issue

相似的 Issue

更多 Operating Systems Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。