Skip to content

Commit 0bf2006

Browse files
committed
fix: kubectl install on windows verify command
Make the the verification command cleaner by using only PS cmdlets. certutil.exe returns 3 lines which need to be split to the hash, as opposed to Get-FileHash that returns an object with .Hash Fixes issue 30833
1 parent 0b0c6a8 commit 0bf2006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en/docs/tasks/tools/install-kubectl-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The following methods exist for installing kubectl on Windows:
5656
- Using PowerShell to automate the verification using the `-eq` operator to get a `True` or `False` result:
5757
5858
```powershell
59-
$($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)
59+
$(Get-FileHash -Algorithm SHA256 .\kubectl.exe).Hash -eq $(Get-Content .\kubectl.exe.sha256)
6060
```
6161
6262
1. Append or prepend the `kubectl` binary folder to your `PATH` environment variable.

0 commit comments

Comments
 (0)