I know this is an old thread but I believe I have the answer here: your env variable is supposed to be the directory NOT including the file name itself.
C:\Users\UserName\Documents\kubectl = incorrect
C:\Users\UserName\Documents = correct
Just a guess: got the right rights? Will it help to run powershell ‘as administrator’?
Easiest is to just copy the kubectl executable to a directory currently known in PATH. In my case:
C:\Users\xcheng>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Users\xcheng\AppData\Local\Microsoft\WindowsApps;
so copy kubectl.exe to C:\Windows\
Or you can add the directory of which your kubectl is located to PATH: https://www.computerhope.com/issues/ch000549.htm