# knife on Windows inconsistently reads ~\.ssh\knife.rb on Management Workstation

I am implementing a new instance of (Open-source v10.12) Chef in an existing environment. Currently the environment is mostly Windows, but more Linux is being introduced. I have used Chef in a previous gig, however that was a *nix-only environment.

Because this is a primarily-Windows environment, my main workstation is Windows 7 (x64), and I use Powershell as my main terminal.

I created a ~\.chef directory, populated with a knife.rb and my client.pem file. When I run knife client list from ~, I get the expected results.

I keep my work in Dropbox just in case my laptop should fail or be stolen. When I run knife client list from the repo directory (C:\Users\waldo\Dropbox_company\projects\chef), I get

(Note that the path is incorrect)

This is the progression as I walk up the tree towards my ~ running knife client list:

C:\Users\waldo\Dropbox\_company\projects\ => Above error
C:\Users\waldo\Dropbox\_company\          => Above error
C:\Users\waldo\Dropbox\                   => It works!  (Expected results)
C:\Users\waldo\                           => Expected results
C:\Users\waldo\Documents\                 => Expected Results
C:\Users\waldo\Documents\GitHub           => Expected Results
C:\Users\waldo\Documents\GitHub\aProject\ => Expected Results


WTF?!

(All files are on local disk; none of these locations are mapped/mounted from a remote server.)

Now, I know that I can add -c path\to\knife.rb, but that's a HUGE PITA.

Question is: Why is knife inconsistently reading my ~\.chef\knife.rb, and how can I get around that without incurring carpal tunnel?

-

C:> doskey alias_name=C:>\path\to\knife -c \path\to\knife.rb \$*
`