Skip to content

Commit

Permalink
Fixing the template for the inspection of the certificate binding to …
Browse files Browse the repository at this point in the history
…now be needing to be false to make sure that the certificate is then added
  • Loading branch information
stack72 committed Jun 19, 2014
1 parent b8e4de1 commit f4b4b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/inspect-certificate-binding.ps1.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module WebAdministration

if((Test-Path IIS:\SslBindings\<%= ip_address %>!<%= port %>) -eq $true) {
if((Test-Path IIS:\SslBindings\<%= ip_address %>!<%= port %>) -eq $false) {
$site = Get-Website | Where-Object { $_.Name -eq "<%= site_name %>" }
$certsAttachedToSite = Get-ChildItem IIS:\SSLBindings | ? { $site | Select-Object { $_ -contains $_.Sites.Value }} | % { $_.Thumbprint }
$certificate = Get-ChildItem CERT:\LocalMachine\My | ? { $certsAttachedToSite -contains $_.Thumbprint} | Where-Object { $_.Thumbprint -eq "<%= certificate_thumbprint %>" }
Expand Down

0 comments on commit f4b4b34

Please sign in to comment.