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?
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?
Because there can be multiple bindings. You have to iterate through each of them:
Get-Website |
Select-Object Bindings |
Where { $_.BindingInformation -like '*DOMAIN*' }