title: Check for net.tcp binding in PowerShell
body: <p>I am configuring a process that checks IIS settings on a Web Server for net.tcp bindings for a particual Web Site, and if it does not exist, create it. I have this chunk of code to check</p>
  
  <pre><code>$Websites = Get-ChildItem IIS:\Sites
  
  foreach ($Site in $Websites) {
  
          if ($Site.name -eq "LOSSI") {
  
             $Binding = $Site.bindings
             foreach ($bind in $Binding.collection) {
  
                      if ($bind -eq "net.tcp 443:*")
                         {        
                              Write-Host $bind
                         }
              }
          }
  }
  </code></pre>
  
  <p>But I never fall into the last conditional. I have validated by hand that the binding is set to </p>
  
  <p>LOSSI<br>
   3<br>
  Started<br>
  D:\LOSSI<br>
  http *:63211: net.tcp 443:</p>
  
  <p>I imagine I am doing something silly wrong, but I cannot figure it out. Is there an easier way to check a website for tcp binding?</p>