Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- docker, powershell
- Domaine
- devops, operating-systems
Piste de recherche
Commencez par reproduire l’échec avec l’image mcr.microsoft.com/powershell et PowerShell 7.4.2 en utilisant la commande Restart-Computer signalée, puis comparez-le avec l’environnement Windows 11 fonctionnel. Déterminez si l’absence du paramètre ComputerName est due à la plateforme de conteneurs ou à l’image ; le travail est terminé lorsqu’un correctif vérifié ou une limitation et une solution de contournement clairement documentées existent.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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
- Langage dominant
- Dockerfile
- Étoiles
- 449
- Forks
- 158
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 1
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/PowerShell-Docker
-
Git OuverteIssue-Enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
PowerShell/PowerShell-Docker#857 ·
-
Container images not deprecated Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
PowerShell/PowerShell-Docker#856 · 2 commentaires · 1 réaction ·
-
Issue-Enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
PowerShell/PowerShell-Docker#853 · 6 commentaires · 17 réactions ·
-
Issue-Enhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
PowerShell/PowerShell-Docker#851 · 2 commentaires · 2 réactions ·
Toutes les issues de PowerShell/PowerShell-Docker
Issues similaires
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Automattic/blocks-engine#2161 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
personalrobotics/tsr#128 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Azure/azure-functions-docker#1257 ·