Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This little script will create a certificate that can be used for the Master Collumn Encryption Key, location and private key permissions will need to be altered
$storeLocation = "CurrentUser"
$certPath = "Cert:" + $storeLocation + "\My"
$cert = New-SelfSignedCertificate -Subject "cert1" -CertStoreLocation $certPath -KeyExportPolicy Exportable -Type CodeSigningCert -KeySpec None -KeyUsage KeyEncipherment -HashAlgorithm sha256 -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.8.2.2,1.3.6.1.4.1.311.10.3.11")
# keep in mind the Serviceaccount needs access to the private key, permissions need to be set and also the location would need to be altered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment