mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Workaround for bug in PowerShell Get-Website cmdlet.
This commit is contained in:
parent
2a4704e21d
commit
eaf6d6fb4d
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ $result = New-Object psobject @{
|
||||||
};
|
};
|
||||||
|
|
||||||
# Site info
|
# Site info
|
||||||
$site = Get-Website -Name $name
|
$site = Get-Website | Where { $_.Name -eq $name }
|
||||||
|
|
||||||
Try {
|
Try {
|
||||||
# Add site
|
# Add site
|
||||||
|
@ -113,7 +113,7 @@ Try {
|
||||||
$result.changed = $true
|
$result.changed = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
$site = Get-Website -Name $name
|
$site = Get-Website | Where { $_.Name -eq $name }
|
||||||
If($site) {
|
If($site) {
|
||||||
# Change Physical Path if needed
|
# Change Physical Path if needed
|
||||||
if($physical_path) {
|
if($physical_path) {
|
||||||
|
@ -165,7 +165,7 @@ Catch
|
||||||
Fail-Json (New-Object psobject) $_.Exception.Message
|
Fail-Json (New-Object psobject) $_.Exception.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
$site = Get-Website -Name $name
|
$site = Get-Website | Where { $_.Name -eq $name }
|
||||||
$result.site = New-Object psobject @{
|
$result.site = New-Object psobject @{
|
||||||
Name = $site.Name
|
Name = $site.Name
|
||||||
ID = $site.ID
|
ID = $site.ID
|
||||||
|
|
Loading…
Reference in a new issue