How can Windows authorize a script signer for one non-interactive local account when its Root store rejects an addition?

WinSigningQuery 0 Reputation points
2026-11-29T10:47:02.3466667+00:00

On a standalone Windows 10 Pro 22H2 PC, an application uses a dedicated local account to run Windows PowerShell 5.1 without an interactive desktop. The planned test requires AllSigned. With the dedicated account’s profile loaded, an elevated administrator could open that account’s Root certificate store. Adding the public certificate of a self-signed test publisher returned 0x80070005 (Access is denied). No certificate was installed.

What is the supported way, if one exists, to authorize this publisher for that account alone? In particular, what read-only check would distinguish a Windows requirement for consent from the target user from a restriction that the application managing the account must address? We want to retain AllSigned and avoid changing trust for the whole machine.

Wording assisted by ChatGPT.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Jason Nguyen Tran 31,625 Reputation points Independent Advisor
    2026-11-30T02:30:18.4566667+00:00

    Hi WinSigningQuery,

    The Access Denied error is Windows working as designed. Each user's Root store is protected, so a root certificate can only be added after that user confirms a security prompt in their own session, and an administrator can't give that consent for them.

    Read-only checks:

    • Run reg query "HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\Root\ProtectedRoots" /v Flags. If bit 0x1 is set, a policy blocks per-user roots completely. If it isn't set, only the user's consent is missing.
    • In secpol.msc > User Rights Assignment, check whether the account is denied local logon. If it is, the user can never see the prompt, and that's something your application needs to address.

    Supported fix (this account only): Sign in once as the dedicated account (or use runas /user:<account> powershell), import the certificate into Cert:\CurrentUser\Root and accept the prompt, then import it into Cert:\CurrentUser\TrustedPublisher as well. After that, AllSigned scripts will run non-interactively under that account, and machine-wide trust stays untouched.

    I hope the response provided some helpful insight. If you find this answer useful, please hit “accept answer” so I know it addressed your concern.

    Jason

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.