> ## Documentation Index
> Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Microsoft SignTool commands

> Demonstration and usage examples of signtool sign and verify commands.

This section demonstrates two Microsoft SignTool commands (**signtool** **sign** and **signtool** **verify**).

The **signtool** **sign** command applies specifically to this integration because it is the only SignTool command that initiates communication with the KMES Series 3. SignTool must be able to access the private key that is stored on the KMES to complete the code signing operation successfully.

## Sign a file using the configured code signing certificate

The following example signs an `.exe` file, but you can sign other types of files by using SignTool. Refer to the following URL for details: [**https://docs.microsoft.com/en-us/windows/win32/seccrypto/cryptography-tools**](https://docs.microsoft.com/en-us/windows/win32/seccrypto/cryptography-tools)

<Steps>
  <Step>
    Open the Windows command prompt and run the following command (Replace*MyCertificate* with the **Subject Name** of your certificate and *example.exe* with the name of the file that you are signing):

    ```powershell expandable lines wrap title="Powershell" theme={null}
    signtool sign /sm /fd sha256 /s My /n "MyCertificate" example.exe
    ```

    <Check>
      If the command succeeds, you see the following message:

      ```none expandable lines wrap title="None" theme={null}
      Done Adding Additional Store
      Successfully signed: example.exe
      ```
    </Check>
  </Step>
</Steps>

### Verify the file that was signed

<Steps>
  <Step>
    To verify the file that was signed, run the following command:

    ```powershell expandable lines wrap title="Powershell" theme={null}
    signtool verify /pa example.exe
    ```

    <Check>
      If the command succeeds, you see the following message:

      ```none expandable lines wrap title="None" theme={null}
      File: example.exe
      Index  Algorithm  Timestamp
      ========================================
      0      sha1       None

      Successfully verified: example.exe
      ```
    </Check>
  </Step>
</Steps>
