Skip to content

Instantly share code, notes, and snippets.

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 @("{text},")
# 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