title: Set-AuthenticodeSignature won't perform SHA256 Timestamp?
body: <p>Signing Windows binaries on Server Core Windows Server 2019 Datacenter Edition with Visual Studio 2019 Community.
  <code>signtool.exe</code> was not behaving correctly (issues opening PFX file), and so we were advised to switch to PowerShell + <code>Set-AuthenticodeSignature</code>.</p>
  
  <p>Using the following commands: </p>
  
  <pre><code>$securepassword = ConvertTo-SecureString -String $password -AsPlainText -Force
  
  $pfx = Get-PfxData -FilePath $certificate -Password $securepassword
  $cert = $pfx.EndEntityCertificates[0]
  
  Set-AuthenticodeSignature -FilePath $target -Certificate $cert -HashAlgorithm "SHA256" -TimestampServer http://timestamp.digicert.com
  
  </code></pre>
  
  <p>results in a binary with the expected SHA256 signature, however, the Timestamp Signature is SHA1. Have also tried using <code>http://timestamp.digicert.com?alg=sha256</code> as the server, however <code>Set-AuthenticodeSignature</code> does not add the timestamp signature at all.</p>
  
  <p>Since this command doesn't allow you to specify the hash of the Timestamp algorithm, how can we achieve this?</p>