[RESOLVED] Windows: The term 'install' is not recognized as the name of a cmdlet, function, script file, or operable program

Hi,

I am new to Chef (brand new!) and following the instructions on setting up a server to manage:
https://learn.chef.io/modules/learn-the-basics/windows/bring-your-own-system/set-up-a-machine-to-manage#/

I have hit a wall in the installation. The command is:
{iwr -useb https://omnitruck.chef.io/install.ps1} | iex; install -project chefdk -channel stable -version 2.5.3

`First, I get: 
    StatusCode        : 200
    StatusDescription : OK
    Content           : new-module -name Omnitruck -scriptblock {
                        [Console]::OutputEncoding = New-Object -typename System.Text.ASCIIEncoding
                        [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolTy...
    RawContent        : HTTP/1.1 200 OK
                        X-Content-Type-Options: nosniff
                        Age: 0
                        Connection: keep-alive
                        X-Served-By: cache-lhr6344-LHR
                        X-Cache: MISS
                        X-Cache-Hits: 0
                        X-Timer: S1539985144.098413,VS0,VE748
                        Accept-Ranges: ...
    Forms             : 
    Headers           : {[X-Content-Type-Options, nosniff], [Age, 0], [Connection, keep-alive], [X-Served-By, 
                        cache-lhr6344-LHR]...}
    Images            : {}
    InputFields       : {}
    Links             : {}
    ParsedHtml        : 
    RawContentLength  : 15330`

Then it fails with:
install : The term 'install' 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:58 + ... r -useb https://omnitruck.chef.io/install.ps1} | iex; install -projec …

The server is a Windows 2016 Hyper-V VM (the host is Windows 10).

Hi @GregH2O,

The https://omnitruck.chef.io/install.ps1 contains install-project function, so probably your command should be:

{iwr -useb https://omnitruck.chef.io/install.ps1} | iex; install-project chefdk -channel stable -version 2.5.3

Hi Simark,

Thanks for that. You put in the right direction! "install" is listed as an alias for "install-project" in the install.ps1 file, but for some reason, it seems the module doesn't install correctly, so neither "install-project" (or install) become available.

I copied the contents of "install.ps1" and ran them manually, and was then able to run
'install -project chefdk -channel stable -version 2.5.3'

That seems to have installed fine.

It was simply not sourced in... the . was missing

. {iwr -useb https://omnitruck.chef.io/install.ps1} | iex; install -project chefdk -channel stable -version 2.5.3

Or other correct solution

iwr -useb https://omnitruck.chef.io/install.ps1 | iex; install -project chefdk -channel stable -version 2.5.3