3

I am trying to verify the validity of a package I downloaded (kubectl) using this command:

$($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)

as specified in their website but I get this error:

    CertUtil : The term 'CertUtil' is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I added the path to C:\Windows\System32\certutil.exe to the Path env variable but still didn't work.

KZiovas
  • 3,491
  • 3
  • 26
  • 47
  • Weird: on my PC "CertUtil" can be found on the System32 directory (C:\Windows\System32\certutil.exe), is everything ok with your `PATH` environment variable? – Dominique Jul 01 '22 at 09:16
  • Can you try appending an ampersand `&` before the CertUtil command like this: `$($(& CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)` – NiMux Jul 01 '22 at 09:23
  • 1
    yeah the problem was with the path, @Dominique I have the same path as you. But I added the whole path including the filename in the `PATH` variable. It should just be the directory `C:\Windows\System32` – KZiovas Jul 01 '22 at 09:46

0 Answers0