Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- docker, powershell
- Domínio
- devops, operating-systems
Direção de pesquisa
Comece reproduzindo a falha com a imagem mcr.microsoft.com/powershell e o PowerShell 7.4.2 usando o comando Restart-Computer relatado e, em seguida, compare-a com o ambiente funcional do Windows 11. Determine se a ausência do parâmetro ComputerName é causada pela plataforma de contêineres ou pela imagem; considera-se concluído quando houver uma correção verificada ou uma limitação e uma solução alternativa claramente documentadas.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Dockerfile
- Estrelas
- 449
- Forks
- 158
- Merge médio
- 3d 10h
- PRs com merge (30d)
- 1
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShell-Docker
-
Git AbertaIssue-Enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
PowerShell/PowerShell-Docker#857 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
PowerShell/PowerShell-Docker#856 · 2 comentários · 1 reação ·
-
Issue-Enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
PowerShell/PowerShell-Docker#853 · 6 comentários · 17 reações ·
-
Issue-Enhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
PowerShell/PowerShell-Docker#851 · 2 comentários · 2 reações ·
Todas as issues de PowerShell/PowerShell-Docker
Issues semelhantes
-
agent-ready documentation needs-triage
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
-
area-deployment area-integrations triage:bot-seen
Dificuldade 2/5 Meio dia Facilidade para iniciantes 86/100
-
agentic-workflows
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
refactor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Abertabug build
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 91/100
facebookincubator/velox#19194 ·