|
|
@ -171,7 +171,13 @@ Catch
|
|
|
|
Fail-Json (New-Object psobject) $_.Exception.Message
|
|
|
|
Fail-Json (New-Object psobject) $_.Exception.Message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($state -ne 'absent')
|
|
|
|
|
|
|
|
{
|
|
|
|
$site = Get-Website | Where { $_.Name -eq $name }
|
|
|
|
$site = Get-Website | Where { $_.Name -eq $name }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($site)
|
|
|
|
|
|
|
|
{
|
|
|
|
$result.site = New-Object psobject @{
|
|
|
|
$result.site = New-Object psobject @{
|
|
|
|
Name = $site.Name
|
|
|
|
Name = $site.Name
|
|
|
|
ID = $site.ID
|
|
|
|
ID = $site.ID
|
|
|
@ -180,6 +186,6 @@ $result.site = New-Object psobject @{
|
|
|
|
ApplicationPool = $site.applicationPool
|
|
|
|
ApplicationPool = $site.applicationPool
|
|
|
|
Bindings = @($site.Bindings.Collection | ForEach-Object { $_.BindingInformation })
|
|
|
|
Bindings = @($site.Bindings.Collection | ForEach-Object { $_.BindingInformation })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Exit-Json $result
|
|
|
|
Exit-Json $result
|
|
|
|