I am signing some built exe files with the Microsoft signtool. The command line is quite long, and always the same, apart from the target file name at the end. So I'd like to keep most of it in a handy variable:
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" sign /fd SHA256 /a /t http://timestamp.comodoca.com/authenticode $builtFile
I could store the path to signtool in a simple variable, but I want to include the arguments. How can I do that without getting a parser error?
$signTool = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" sign /fd SHA256
ParserError: Unexpected token 'sign' in expression or statement.