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

WithRetry : The term 'Install-PowerShell' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
powershell
领域
cloud

调研方向

从 main.ps1 的第 127-128 行附近开始,这里脚本会获取 https://aka.ms/install-powershell 并创建 Install-PowerShell。检查 Invoke-RestMethod 无法连接的原因,以及由此产生的 null 值为何会阻止函数创建。完成的标准是 DevBox 自定义完成,并且 Install-PowerShell 可用。

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

描述

[2024-12-03T11:02:08.415928+00:00] Installing PowerShell 7
[2024-12-03T11:03:33.963388+00:00] Invoke-RestMethod : Unable to connect to the remote server
[2024-12-03T11:03:33.963547+00:00] At C:\Windows\SystemTemp\d54cbee8-4b8b-46f4-9a40-bbeecf7f79ee\pwpcij52.1jc\main.ps1:127 char:17
[2024-12-03T11:03:33.963553+00:00] + ... $code = Invoke-RestMethod -Uri https://aka.ms/install-powershell. ...
[2024-12-03T11:03:33.963554+00:00] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2024-12-03T11:03:33.963559+00:00] + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
[2024-12-03T11:03:33.963566+00:00] eption
[2024-12-03T11:03:33.963570+00:00] + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
[2024-12-03T11:03:33.963572+00:00]
[2024-12-03T11:03:34.048223+00:00] New-Item : Cannot process argument because the value of argument "value" is null. Change the value of argument "value"
[2024-12-03T11:03:34.048450+00:00] to a non-null value.
[2024-12-03T11:03:34.048458+00:00] At C:\Windows\SystemTemp\d54cbee8-4b8b-46f4-9a40-bbeecf7f79ee\pwpcij52.1jc\main.ps1:128 char:17
[2024-12-03T11:03:34.048460+00:00] + ... $null = New-Item -Path function:Install-PowerShell -Value $code
[2024-12-03T11:03:34.048494+00:00] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2024-12-03T11:03:34.048500+00:00] + CategoryInfo : InvalidArgument: (Install-PowerShell:String) [New-Item], PSArgumentNullException
[2024-12-03T11:03:34.048506+00:00] + FullyQualifiedErrorId : NewItemValueNotSpecified,Microsoft.PowerShell.Commands.NewItemCommand
[2024-12-03T11:03:34.048512+00:00]
[2024-12-03T11:03:34.128947+00:00] WithRetry : The term 'Install-PowerShell' is not recognized as the name of a cmdlet, function, script file, or
[2024-12-03T11:03:34.129015+00:00] operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
[2024-12-03T11:03:34.129038+00:00] again.

Note - we have allowed the required network for devbox subnet, but still the customizing failed, please advise.

主要语言
PowerShell
星标
52
派生
194
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

microsoft/devcenter-catalog 的其他 Issue

查看 microsoft/devcenter-catalog 的全部 Issue

相似的 Issue

更多 Cloud Issue

把新 issue 发到你的邮箱

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