Open DaleyKD opened 2 years ago
I copied cmd.exe to my WINDOWS directory and it worked... but I'm only going to keep it there temporarily.
@DaleyKD from this code it's using the cmd.exe
to invoke the az cli. I'm guessing for some reason cmd.exe
isn't available in your search path? does typing cmd.exe
work?
@weinong : That code also shows that it's getting the %SYSTEMROOT%
directory. That resolves to C:\WINDOWS
on all of my machines. That is NOT where cmd.exe
lives. I would think it should be %WINDIR%\system32
or %COMSPEC%
(which is the full path to cmd.exe
).
But to answer your question, yes, cmd.exe
was in my search path (%PATH%
). It is in C:\windows\system32
which is in my %PATH%
environment variable. And when I type cmd.exe, it opens right up.
EDIT: In fact, if you look at my OP, you'll see that I showed all of the directories in my search path (%PATH%
).
Windows 10 21H2 PowerShell 7.2.6
Installed Azure\kubelogin by exec
az aks install-cli
. It's currently version0.0.20
.This is how I prepared everything.
Finally, I just want
kubectl
to get me a version number.Not sure why it's looking for cmd.exe in the root of Windows?
(Omitted some for brevity, such as
C:\Windows\servicing\LCU\Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1826.1.8
andC:\Windows\WinSxS\amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.19041.746_none_...
)