mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
MSIX: minor cleanup, add certificate generation script
This commit is contained in:
5
installer/MSIX/generate_self_sign_cert.ps1
Normal file
5
installer/MSIX/generate_self_sign_cert.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
$expirationDate = {Get-Date}.Invoke().AddYears(5)
|
||||
$pass = ConvertTo-SecureString -String "12345" -Force -AsPlainText
|
||||
$thumbprint = (New-SelfSignedCertificate -notafter $expirationDate -Type CodeSigningCert -Subject "CN=Microsoft Corporation" -FriendlyName "PowerToys Test Certificate" -KeyDescription "PowerToys Test Certificate" -KeyFriendlyName "PowerToys Test Key" -KeyUsage "DigitalSignature" -CertStoreLocation Cert:\LocalMachine\My).Thumbprint
|
||||
Export-PfxCertificate -Cert cert:\LocalMachine\My\$thumbprint -FilePath PowerToys_TemporaryKey.pfx -Password $pass
|
||||
Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath PowerToys_TemporaryKey.pfx -Password $pass
|
||||
Reference in New Issue
Block a user