Learn how to run kubectl on Windows PowerShell and Command Prompt.
In nutshell, these are the steps.
1) Download the kubectl.exe application using a curl command, and move the kubectl.exe in the “C:\Users\USERNAME”.
The curl command is as shown below. If you need different version, just change the directory name (v1.23.0)
curl -LO “https://dl.k8s.io/release/v1.23.0/bin/windows/amd64/kubectl.exe”
2) Download the KubectlConfig from your Kubernetes engine (such as Rancher) and rename it as “config” (with no filename extension).
3) Next, create a .kube folder in the “C:\Users\USERNAME” directory, and place the kubectl config file (from STEP 2) in there.
This is what your drive should look like when it is done.
Reference