title: Check for enabled static address always returns True
body: <p>Looking to push out a PS script to check for workstations that have a static IP address enabled however the variable always returns as True. I am sure it is something simple I am missing but I can not figure it out.</p>
  <pre><code>    $Check = Get-NetIPInterface -ConnectionState Connected | ?{$_.InterfaceAlias -notcontains &quot;Loopback Pseudo-Interface 1&quot; -and $_.Dhcp -notlike &quot;Enabled&quot;}
  
      If ($Check = $True) {
          Write-Host &quot;Sending Email&quot;
      }
  </code></pre>