@@ -60,24 +60,23 @@ function Get-TargetResource
60
60
61
61
$handler = Get-IisHandler - Name $Name - SiteName $SiteName
62
62
63
- if ($handler )
63
+ if ($handler )
64
64
{
65
65
$Ensure = ' Present'
66
66
$modulePresent = $true ;
67
- }
68
67
69
- foreach ($thisVerb in $handler.Verb )
70
- {
71
- $currentVerbs += $thisVerb
68
+ foreach ($thisVerb in $handler.Verb.Split (' ,' ))
69
+ {
70
+ $currentVerbs += $thisVerb
71
+ }
72
72
}
73
73
74
74
$fastCgiSetup = $false
75
75
76
76
if ($handler.Modules -eq ' FastCgiModule' )
77
77
{
78
78
$fastCgi = Get-WebConfiguration / system.webServer/ fastCgi/* `
79
- - PSPath (Get-IisSitePath `
80
- - SiteName $SiteName ) | `
79
+ - PSPath (Get-IisSitePath ) | `
81
80
Where-Object {$_.FullPath -ieq $handler.ScriptProcessor }
82
81
if ($fastCgi )
83
82
{
@@ -152,19 +151,19 @@ function Set-TargetResource
152
151
if (-not $resourceTests.ModulePresent -or -not $resourceTests.ModuleConfigured )
153
152
{
154
153
Write-Verbose - Message $LocalizedData.VerboseSetTargetAddHandler
155
- Add-webconfiguration / system.webServer/ handlers iis:\ - Value @ {
154
+ Add-webconfiguration / system.webServer/ handlers - PSPath ( Get-IisSitePath - SiteName $SiteName ) - Value @ {
156
155
Name = $Name
157
156
Path = $RequestPath
158
157
Verb = $Verb -join ' ,'
159
- Module = $ModuleType
158
+ Modules = $ModuleType
160
159
ScriptProcessor = $Path
161
160
}
162
161
}
163
162
164
- if (-not $resourceTests .EndPointSetup )
163
+ if (-not $resourceStatus .EndPointSetup )
165
164
{
166
165
Write-Verbose - Message $LocalizedData.VerboseSetTargetAddfastCgi
167
- Add-WebConfiguration / system.webServer/ fastCgi iis:\ - Value @ {
166
+ Add-WebConfiguration / system.webServer/ fastCgi ( Get-IisSitePath ) - Value @ {
168
167
FullPath = $Path
169
168
}
170
169
}
@@ -344,19 +343,19 @@ function Test-TargetResourceImpl
344
343
)
345
344
346
345
$matchedVerbs = @ ()
347
- $mismatchVerbs = @ ()
348
- foreach ($thisVerb in $resourceStatus.Verb )
346
+ $mismatchVerbs = @ ()
347
+ foreach ($thisVerb in $resourceStatus.Verb )
349
348
{
350
349
if ($Verb -icontains $thisVerb )
351
350
{
352
351
Write-Verbose - Message ($LocalizedData.VerboseTestTargetResourceImplVerb `
353
- -f $Verb )
352
+ -f $thisVerb )
354
353
$matchedVerbs += $thisVerb
355
354
}
356
355
else
357
356
{
358
357
Write-Verbose - Message ($LocalizedData.VerboseTestTargetResourceImplExtraVerb `
359
- -f $Verb )
358
+ -f $thisVerb )
360
359
$mismatchVerbs += $thisVerb
361
360
}
362
361
}
@@ -379,7 +378,7 @@ function Test-TargetResourceImpl
379
378
$moduleConfigured = $false
380
379
if ($modulePresent -and `
381
380
$mismatchVerbs.Count -eq 0 -and `
382
- $matchedVerbs.Count - eq $Verb.Count -and `
381
+ $matchedVerbs.Count -eq $Verb.Count -and `
383
382
$resourceStatus.Path -eq $Path -and `
384
383
$resourceStatus.RequestPath -eq $RequestPath )
385
384
{
0 commit comments