2

Why can't I do a simple:

Get-Website | where { $_.Bindings -like "*DOMAIN*" }

On the Bindings? But it works fine on the Name and Physical Path? Any way to do a search on the Bindings with get-website?

user1281991
  • 763
  • 1
  • 12
  • 34

1 Answers1

2

Because there can be multiple bindings. You have to iterate through each of them:

Get-Website | 
    Select-Object Bindings |
    Where { $_.BindingInformation -like '*DOMAIN*' }
Aaron Jensen
  • 25,861
  • 15
  • 82
  • 91