Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- docker, powershell
研究方向
首先,使用回報的 Restart-Computer 命令,在 mcr.microsoft.com/powershell 映像和 PowerShell 7.4.2 上重現此失敗,然後與正常運作的 Windows 11 環境進行比較。確認缺少的 ComputerName 參數是由容器平台還是映像造成的;當問題已有經過驗證的修正,或已有清楚記錄的限制與因應措施時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest image.
- Search the existing issues.
- Verified that this is not a Known Issue
- Verified this is not an issues in the underlying windows container that should be reported to Windows Feedback Hub
Steps to reproduce
Trying to remotely restart a windows computer with powershell and Restart-Computer command.
Powershell is running from a docker container with mcr.microsoft.com/powershell image, and from within the docker container i am running a powerhell script.
The script is also tested on a windows 11 machine with powershell and it works as expected.
Output from the script running from powershell in docker, PowerShell 7.4.2.
Expected behavior
Restart remote computer
Actual behavior
PS /> /root/scripts/restart.ps1
Restart-Computer: /root/scripts/restart.ps1:9
Line |
9 | Restart-Computer -ComputerName $server -Credential $credObject -Force …
| ~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'ComputerName'.
Error details
No response
Environment data
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 742,
"digest": "sha256:73c08403182e3cd1a62176b6723645b2d2037cda8deefc0e2c2c01cb814abe43",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 1160,
"digest": "sha256:f7306ab20f28b5609264d6e49cb18a4804cafe7a78c33679e3a6ce907d692d0a",
"platform": {
"architecture": "arm",
"os": "linux",
"variant": "v7"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2001,
"digest": "sha256:055163474207105ca91482e142b923a65c0853feead3812d7f1cdc04203ab244",
"platform": {
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.20348.2402"
}
}
]
}
Visuals
No response
- 主要語言
- Dockerfile
- 星號
- 448
- 分支
- 158
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/PowerShell-Docker 的其他 Issue
-
Git未關閉Issue-Enhancement
難度 2/5 1-3 小時 新手友好度 62/100
PowerShell/PowerShell-Docker#857 ·
-
難度 4/5 3-5 天 新手友好度 35/100
PowerShell/PowerShell-Docker#856 · 2 則留言 · 1 個 reaction ·
-
Issue-Enhancement
難度 2/5 1-3 小時 新手友好度 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
難度 5/5 一週以上 新手友好度 25/100
PowerShell/PowerShell-Docker#853 · 6 則留言 · 17 個 reaction ·
-
Issue-Enhancement
難度 3/5 1-2 天 新手友好度 45/100
PowerShell/PowerShell-Docker#851 · 2 則留言 · 2 個 reaction ·
查看 PowerShell/PowerShell-Docker 的全部 Issue
相似的 Issue
-
python-version
難度 1/5 1 小時以內 新手友好度 88/100
-
initramfs: -type f (#18686) skips the libcurl.so.4 symlink, libcurl no longer copied into initramfs未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
bug triage
難度 2/5 1-3 小時 新手友好度 62/100
FairwindsOps/nova#484 ·
-
CI
難度 2/5 1-3 小時 新手友好度 70/100
AR-js-org/arjs-plugin-artoolkit#69 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 66/100
louislam/uptime-kuma#7956 · 4 則留言 ·
維護者通常 1 天內回覆