AutomatedLab / AutomatedLab/SfBAutomatedLab

Install-SfbLabRequirements fails - incorrect function called

Aperta
#15 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PowerShell
Stelle
14
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Install-SfbLabRequirements fails with multiple message like this one:
```
Get-LabMachine : The term 'Get-LabMachine' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At C:\Program Files\WindowsPowerShell\Modules\SfBAutomatedLab\0.6\SfBAutomatedLab.psm1:314 char:17
+ $machines = Get-LabMachine
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-LabMachine:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Install-LabWindowsFeature : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command
again.
At C:\Program Files\WindowsPowerShell\Modules\SfBAutomatedLab\0.6\SfBAutomatedLab.psm1:315 char:45
+ Install-LabWindowsFeature -ComputerName $machines -FeatureName NE ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Install-LabWindowsFeature], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Install-LabWindowsFeature
```
This is because Get-LabMachineDefinition should be used instead of Get-LabMachine.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia in SfBAutomatedLab.psm1 intorno alle righe 314-315 e riproduci il problema tramite Install-SfbLabRequirements. Controlla la chiamata segnalata a Get-LabMachine e il suo utilizzo come argomento ComputerName. Il lavoro è completato quando l’errore di comando non trovato segnalato e il conseguente errore di argomento null non si verificano più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell
Ambito
devops
Tipo di issue
Bug
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.