lib/specinfra/backend/powershell/support/find_iis_component.ps1 in specinfra-1.23.1 vs lib/specinfra/backend/powershell/support/find_iis_component.ps1 in specinfra-1.24.0

- old
+ new

@@ -1,9 +1,15 @@ function FindIISWebsite { param($name) - import-module WebAdministration - Get-Website | Where { $_.name -match $name } + Import-Module WebAdministration + + Try { + Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue + } + Catch [System.IO.FileNotFoundException] { + Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue + } } function FindIISAppPool { param($name) \ No newline at end of file