Skip to content

Commit

Permalink
Set HasPrivateKey -eq $true
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHughesIV committed Jun 13, 2020
1 parent a8c3dd3 commit 6b450a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/DSCResources/MSFT_xWebSite/MSFT_xWebSite.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ function ConvertTo-WebBinding
if ($FindCertificateSplat)
{
$FindCertificateSplat.Add('Store',$CertificateStoreName)
$Certificate = Find-Certificate @FindCertificateSplat | Where-Object {$_.PrivateKey -ne ''} | Sort-Object -Property NotAfter -Descending | Select-Object -First 1
$Certificate = Find-Certificate @FindCertificateSplat | Where-Object {$_.HasPrivateKey -eq $true} | Sort-Object -Property NotAfter -Descending | Select-Object -First 1
if ($Certificate)
{
$certificateHash = $Certificate.Thumbprint
Expand Down

0 comments on commit 6b450a3

Please sign in to comment.