Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, powershell
- Área
- devops, operating-systems
Línea de trabajo
Comienza reproduciendo el fallo con la imagen mcr.microsoft.com/powershell y PowerShell 7.4.2 usando el comando Restart-Computer indicado, y compáralo después con el entorno funcional de Windows 11. Determina si la ausencia del parámetro ComputerName se debe a la plataforma de contenedores o a la imagen; se considerará terminado cuando exista una solución verificada o una limitación y una solución alternativa claramente documentadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Dockerfile
- Estrellas
- 449
- Forks
- 158
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/PowerShell-Docker
-
Git AbiertoIssue-Enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
PowerShell/PowerShell-Docker#857 ·
-
Container images not deprecated Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PowerShell/PowerShell-Docker#856 · 2 comentarios · 1 reacción ·
-
Issue-Enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
PowerShell/PowerShell-Docker#853 · 6 comentarios · 17 reacciones ·
-
Issue-Enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
PowerShell/PowerShell-Docker#851 · 2 comentarios · 2 reacciones ·
Todos los issues de PowerShell/PowerShell-Docker
Issues similares
-
Add dependabot Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
-
oblt-aw/detector/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Type: AVM :a: :v: :m: Type: Bug :bug:
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Azure/bicep-registry-modules#7386 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100