Sign On Save
Sign scripts after they are saved.
The Sign on Save features provides a way to sign scripts right after they are saved using a configured code-signing certificate.
You can configure sign on save by enabling the feature in settings and providing a certificate path.

The path can be left empty and the extension will provide a quick pick drop down the first time you save a file.

Once you select a certificate, it will store that in the Sign On Save Certificate setting. You'll notice the setting is the full path to the certificate in the certificate store.
Microsoft.PowerShell.Security\Certificate::CurrentUser\My\Aasdfasdf23fdasfd0as872389723soad
With the setting enabled, any time you save a file,
Set-AuthenticodeSignature
will be called and your file will be signed. Last modified 2yr ago