pluralsight / PS-AutoLab-Env

A PowerShell module for creating lab configurations using Lability and Desired State Configuration. Look at README.md for more information.
MIT License
269 stars 74 forks source link

.\Setup-Host.ps1 results in an error #258

Closed AiPeeKings closed 2 years ago

AiPeeKings commented 2 years ago

Hello Jeff,

I have just started your beginner PowerShell course on PluralSight.

I believe I have followed all yours steps passionately but I get an error when I type in this command .\Setup-Host.ps1 after changing my directory to PS C:\PS-AutoLab-Env-master> as you instructed.

Yet I downloaded. extracted and saved the PS-AutoLab-Env-master folder in my C: drive.

Here is the error message I got:

PS C:\PS-AutoLab-Env-master> .\Setup-Host.ps1 .\Setup-Host.ps1 : The term '.\Setup-Host.ps1' 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 line:1 char:1


How would you resolve this problem please?

Cheers, AiPeeKings

jdhitsolutions commented 2 years ago

I suspect you are following old instructions and downloaded the module from Github. That is not the correct process anymore. You should delete everything you downloaded and start all over. You need to install the module from the PowerShell Gallery.

Run this in Windows PowerShell:

Install-Module PSAutolab -force -SkipPublisherCheck

Then you can run:

Setup-Host

Read https://github.com/pluralsight/PS-AutoLab-Env/blob/master/Detailed-Setup-Instructions.md for detailed instructions.

Answer yes to any prompt.

jdhitsolutions commented 2 years ago

closing as inactive and presumed resolved