Reputation: 1069
I have a script that does a get-webbinding and it works fine. However, I need to do something like the following:
$Binding = Get-WebBinding -like $variable
So for example, $variable would be website, but the IIS website would be called website.com. I need it to do a like comparison, but cannot figure out how to do that. I appreciate any advice.
Upvotes: 0
Views: 384
Reputation: 16126
Try this...
$SiteName = 'SiteName'
(Get-WebBinding |
Where bindingInformation -like "*$SiteName*").bindingInformation
Upvotes: 1