question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set-AuthenticodeSignature UnknownError (Windows 2019 Server)

See original GitHub issue

Trying the simplest of commands while trying to sign a file.

$Cert = Get-PfxCertificate -FilePath "myCert.pfx"
Set-AuthenticodeSignature "MyApp.app" -Certificate $Cert

To put some background around my issues, I am trying to run this on a newly created Azure Windows 2019 server. (The same certificate and file types work as expected on the “old” Azure Windows 2016 server.)

To make it more frustrating, I can sign a “.ps1” file on the new 2019 server. I can either create the “.ps1” file as new or even renaming the “.app” file to “.ps1” allows signing correctly.

Any help with this would be appreciated. I can’t seem to find any logs for the UnknownError so it’s very difficult know what the issue is.

SignerCertificate                         Status                                                         Path                                                         
-----------------                         ------                                                         ----                                                         
                                          UnknownError                                                   MyApp.app 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
iSazonovcommented, Feb 4, 2020

@TimothyWatkins Thanks for sharing more info. The issue is not PowerShell related. I believe you should use Windows Server feedback (open a support case, use Feedback tool, use a forum).

You could enable CAPI logs on your system and look events there.

0reactions
msftbot[bot]commented, Feb 5, 2020

This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerShell Code Signing Unknown Error - Microsoft Q&A
Hi Folks, Am hitting a bit of an issue when trying to sign some powershell scripts, I am following this basic ...
Read more >
Set-AuthenticodeSignature UnknownError with new ...
I have been trying to get a new Sectigo code signing certificate working, with no luck, and Sectigo support is utterly useless. I...
Read more >
Signing Powershell Script Returns and "UnknownError" Status
I am trying to self sign some scripts but keep getting a status of "UnknownError" after the script completes successfully. The strange part...
Read more >
Establishing a code-signing environment | Windows Server ...
Now that you have a script, in step 4 you sign it. Note that this generates a status error of UnknownError (which means...
Read more >
UnknownError when using Powershell ISE to Set ...
This is discussed on Microsoft Connect here When attempting to assign a certificate to a powershell script, it does not assign and gives...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found