Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- docker, powershell
- Ambito
- devops, operating-systems
Direzione di ricerca
Inizia riproducendo il malfunzionamento con l’immagine mcr.microsoft.com/powershell e PowerShell 7.4.2 usando il comando Restart-Computer segnalato, quindi confrontalo con l’ambiente Windows 11 funzionante. Determina se l’assenza del parametro ComputerName è causata dalla piattaforma dei container o dall’immagine; il lavoro è completato quando esiste una correzione verificata oppure una limitazione e una soluzione alternativa documentate chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Dockerfile
- Stelle
- 449
- Fork
- 158
- Merge medio
- 3g 10h
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/PowerShell-Docker
-
Git ApertaIssue-Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
PowerShell/PowerShell-Docker#857 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PowerShell/PowerShell-Docker#856 · 2 commenti · 1 reazione ·
-
Issue-Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
PowerShell/PowerShell-Docker#854 ·
-
Issue-Enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
PowerShell/PowerShell-Docker#853 · 6 commenti · 17 reazioni ·
-
Issue-Enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
PowerShell/PowerShell-Docker#851 · 2 commenti · 2 reazioni ·
Tutte le issue di PowerShell/PowerShell-Docker
Issue simili
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
oblt-aw/detector/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Type: AVM :a: :v: :m: Type: Bug :bug:
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Azure/bicep-registry-modules#7386 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100