Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, powershell
- Domain
- devops, operating-systems
Research direction
Start by reproducing the failure with the mcr.microsoft.com/powershell image and PowerShell 7.4.2 using the reported Restart-Computer command, then compare it with the working Windows 11 environment. Determine whether the missing ComputerName parameter is caused by the container platform or the image; done means the issue has a verified fix or a clearly documented limitation and workaround.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Dockerfile
- Stars
- 449
- Forks
- 158
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PowerShell-Docker
-
Git OpenIssue-Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PowerShell/PowerShell-Docker#857 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
PowerShell/PowerShell-Docker#856 · 2 comments · 1 reaction ·
-
Issue-Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
PowerShell/PowerShell-Docker#853 · 6 comments · 17 reactions ·
-
Issue-Enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
PowerShell/PowerShell-Docker#851 · 2 comments · 2 reactions ·
All issues in PowerShell/PowerShell-Docker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
automated issue report
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dsx-ai-factory/infra-controller#6694 ·
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
facebookincubator/velox#19143 ·