mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix win_iis_webapppool module to not null ref when removing an apppool using PS4
This commit is contained in:
parent
092c3ccbde
commit
6f68db5c1a
1 changed files with 10 additions and 7 deletions
|
@ -101,12 +101,15 @@ try {
|
|||
|
||||
# Result
|
||||
$pool = Get-Item IIS:\AppPools\$name
|
||||
$result.info = @{
|
||||
if ($pool)
|
||||
{
|
||||
$result.info = @{
|
||||
name = $pool.Name
|
||||
state = $pool.State
|
||||
attributes = New-Object psobject @{}
|
||||
};
|
||||
};
|
||||
|
||||
$pool.Attributes | ForEach { $result.info.attributes.Add($_.Name, $_.Value)};
|
||||
$pool.Attributes | ForEach { $result.info.attributes.Add($_.Name, $_.Value)};
|
||||
}
|
||||
|
||||
Exit-Json $result
|
||||
|
|
Loading…
Reference in a new issue