# Chef command not found after install

**URL:** <https://discourse.chef.io/t/chef-command-not-found-after-install/17655>\
**Category:** Chef Infra (archive)\
**Created:** [September 10, 2020, 4:37pm UTC](https://discourse.chef.io/t/chef-command-not-found-after-install/17655 "2020-09-10T16:37:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcascone](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mcascone/32/2611_2.png) [@mcascone](https://discourse.chef.io/u/mcascone)\
**Post date:** [September 10, 2020, 4:37pm UTC](https://discourse.chef.io/t/chef-command-not-found-after-install/17655/1 "2020-09-10T16:37:44Z")

</div>

Hi all. I just upgraded to the latest&greated chef workstation, directly from the [chef.io/downloads](https://slack-redir.net/link?url=http%3A%2F%2Fchef.io%2Fdownloads) page. After installation, when i run `chef -v` i get the ol' cmdlet not found:

```auto
PS C:\Users\MaxCadmin> chef -v
chef : The term 'chef' is not recognized as the name of a cmdlet, function, script file, or operable program.

```

I was doing this install to try to fix the same issue on 20.8. It was all working well recently.

`C:\opscode\chef-workstation\bin\` is in the `$PATH` .However, `chef-client -v` does work: `Chef Infra Client: 16.4.41`

`knife` also works: also give the Chef Infra Client version.

For more context on why client and workstation would both be on here, this is a Jenkins agent that i have configured (partially) _with_ chef, and that also has to _run_ chef in jenkins pipelines.

Any ideas on how to resolve/where to look? It's a Win 2012 R2 machine. I feel like it's a path issue but i can't find/fix it.

- Path:

```auto
C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services
C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services
C:\Ruby25-x64\bin
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
C:\Program Files (x86)\MSBuild\14.0\Bin
C:/_utilities/Nuget
C:/_utilities/ChromeDriver
C:\Program Files (x86)\7-Zip
C:\ProgramData\Oracle\Java\javapath
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\
C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
C:/_utilities/Nuget
C:/_utilities/ChromeDriver
C:\Program Files (x86)\7-Zip
C:\ProgramData\Oracle\Java\javapath
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\
C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
C:\Program Files\Git\cmd
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0
C:\Program Files (x86)\Microso
C:\Program Files\OpenJDK\openjdk-11.0.7_10-jre\bin
C:\Program Files\dotnet\
C:\ProgramData\chocolatey\bin
C:\Program Files\PowerShell\7\
C:\opscode\chef-workstation\bin\
C:\opscode\chef-workstation\bin
C:\opscode\chef-workstation\embedded\bin
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow
C:\Users\hl_tfsbuild\AppData\Local\GitHubDesktop\bin
C:\Users\hl_tfsbuild\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\hl_tfsbuild\.dotnet\tools
C:\Program Files\nodejs\

```

---

<div class="post-metadata">

**Author:** ![byteflyer](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@byteflyer](https://discourse.chef.io/u/byteflyer)\
**Post date:** [September 10, 2020, 9:18pm UTC](https://discourse.chef.io/t/chef-command-not-found-after-install/17655/2 "2020-09-10T21:18:50Z")

</div>

Have you tried launching from the shortcut that the workstation app adds to the desktop? I have had issues with running from powershell on locked down machines, but the shortcut that the workstation installer places on the desktop always seems to work.

---

<div class="post-metadata">

**Author:** ![mcascone](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mcascone/32/2611_2.png) [@mcascone](https://discourse.chef.io/u/mcascone)\
**Post date:** [September 11, 2020, 3:35am UTC](https://discourse.chef.io/t/chef-command-not-found-after-install/17655/3 "2020-09-11T03:35:01Z")

</div>

I wish this was a less-stupid answer, but it turned out that the BitDefender security software had deleted the `chef.exe` app out of the `C:/opscode/chef-workstation/bin` directory. It kept doing this even after restoring the file out of its "quarantine".

So i'm kind of stalled on that box until InfoSec can whitelist the app.

What's weird is we have BitDefender on all of our endpoints, and this is the only box that this has happened on. Unfortunately it's a Jenkins windows agent, so it's kind of important. And, it was working until very recently.
