Skip to content

Commit

Permalink
Change Open Cert Store from level 5 to 'MaxAllowed'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Pokorny committed Mar 21, 2024
1 parent 505ebce commit 497dfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IISU/ClientPSCertStoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public JobResult AddCertificate(string certificateContents, string privateKeyPas
function InstallPfxToMachineStore([byte[]]$bytes, [string]$password, [string]$storeName) {
$certStore = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Store -ArgumentList $storeName, ""LocalMachine""
$certStore.Open(5)
$certStore.Open('MaxAllowed')
$cert = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList $bytes, $password, 18 <# Persist, Machine #>
$certStore.Add($cert)
Expand Down

0 comments on commit 497dfac

Please sign in to comment.