Chocolatey failed to install

I’m trying to use a task created by Immybot that relies on Chocolatey. The task is failing to install. Has anyone seen this issue before?

9:14:06am

Checking if Chocolatey is installed.

9:14:06am — 9:14:09am (00:00:02)

Running [Get-InstalledChocolateyVersion] using default timeout [120sec] .

1

$chocoPath=Get-Command choco -ErrorAction Stop|select -expand Source;& $chocoPath -v

Get-Command: The term 'choco' 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.

9:14:09am

Chocolatey was not found, and will be installed.

9:14:09am — 9:14:20am (00:00:10)

Running [Chocolatey Installation Script] using script timeout [120sec] .

Open Debugger

1

2

3

4

5

#region Functions

function Get-Downloader {

<#

.SYNOPSIS

SHOW MORE

Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

SHOW MORE

9:14:14am

Expand-Archive

Processing

9:14:20am — 9:14:23am (00:00:02)

Running [Get-InstalledChocolateyVersion] using default timeout [120sec] .

1

$chocoPath=Get-Command choco -ErrorAction Stop|select -expand Source;& $chocoPath -v

Get-Command: The term 'choco' 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.

9:14:23am

Chocolatey failed to install.

9:14:23am

Software detection failed: Chocolatey failed to install

1 Like

@James_Carter I’m having the exact same problem - if I make any progress I’ll try and let you know.

I did just find this which would implicate the change of the env variable after chocolatey installation necessitates a full terminal session restart. I’ll look into this further. For reference i am trying to use the chocolatey package for Autodesk design review but i have this issue with other deployments as well

chocolatey - ‘choco’ command not recognized when run as administrator on Windows - Stack Overflow

@James_Carter yeah it looks like doing a restart after the first attempt and rerunning lead to more success for me