Merge pull request #797 from cchurch/fix_win_iis_website_get_website
win_iis_website: Workaround bug in Get-Website cmdlet.
This commit is contained in:
commit
086c94687d
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ $result = New-Object psobject @{
|
|||
};
|
||||
|
||||
# Site info
|
||||
$site = Get-Website -Name $name
|
||||
$site = Get-Website | Where { $_.Name -eq $name }
|
||||
|
||||
Try {
|
||||
# Add site
|
||||
|
@ -113,7 +113,7 @@ Try {
|
|||
$result.changed = $true
|
||||
}
|
||||
|
||||
$site = Get-Website -Name $name
|
||||
$site = Get-Website | Where { $_.Name -eq $name }
|
||||
If($site) {
|
||||
# Change Physical Path if needed
|
||||
if($physical_path) {
|
||||
|
@ -165,7 +165,7 @@ Catch
|
|||
Fail-Json (New-Object psobject) $_.Exception.Message
|
||||
}
|
||||
|
||||
$site = Get-Website -Name $name
|
||||
$site = Get-Website | Where { $_.Name -eq $name }
|
||||
$result.site = New-Object psobject @{
|
||||
Name = $site.Name
|
||||
ID = $site.ID
|
||||
|
|
Loading…
Reference in a new issue