Fix win_iis_webapppool module to not null ref when removing an apppool using PS4

This commit is contained in:
Marcin Dobosz 2015-10-16 13:48:32 -07:00 committed by Matt Clay
parent 092c3ccbde
commit 6f68db5c1a

View file

@ -101,6 +101,8 @@ try {
# Result # Result
$pool = Get-Item IIS:\AppPools\$name $pool = Get-Item IIS:\AppPools\$name
if ($pool)
{
$result.info = @{ $result.info = @{
name = $pool.Name name = $pool.Name
state = $pool.State state = $pool.State
@ -108,5 +110,6 @@ $result.info = @{
}; };
$pool.Attributes | ForEach { $result.info.attributes.Add($_.Name, $_.Value)}; $pool.Attributes | ForEach { $result.info.attributes.Add($_.Name, $_.Value)};
}
Exit-Json $result Exit-Json $result