@@ -60,24 +60,23 @@ function Get-TargetResource
6060
6161 $handler = Get-IisHandler - Name $Name - SiteName $SiteName
6262
63- if ($handler )
63+ if ($handler )
6464 {
6565 $Ensure = ' Present'
6666 $modulePresent = $true ;
67- }
6867
69- foreach ($thisVerb in $handler.Verb )
70- {
71- $currentVerbs += $thisVerb
68+ foreach ($thisVerb in $handler.Verb.Split (' ,' ))
69+ {
70+ $currentVerbs += $thisVerb
71+ }
7272 }
7373
7474 $fastCgiSetup = $false
7575
7676 if ($handler.Modules -eq ' FastCgiModule' )
7777 {
7878 $fastCgi = Get-WebConfiguration / system.webServer/ fastCgi/* `
79- - PSPath (Get-IisSitePath `
80- - SiteName $SiteName ) | `
79+ - PSPath (Get-IisSitePath ) | `
8180 Where-Object {$_.FullPath -ieq $handler.ScriptProcessor }
8281 if ($fastCgi )
8382 {
@@ -152,19 +151,19 @@ function Set-TargetResource
152151 if (-not $resourceTests.ModulePresent -or -not $resourceTests.ModuleConfigured )
153152 {
154153 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 @ {
156155 Name = $Name
157156 Path = $RequestPath
158157 Verb = $Verb -join ' ,'
159- Module = $ModuleType
158+ Modules = $ModuleType
160159 ScriptProcessor = $Path
161160 }
162161 }
163162
164- if (-not $resourceTests .EndPointSetup )
163+ if (-not $resourceStatus .EndPointSetup )
165164 {
166165 Write-Verbose - Message $LocalizedData.VerboseSetTargetAddfastCgi
167- Add-WebConfiguration / system.webServer/ fastCgi iis:\ - Value @ {
166+ Add-WebConfiguration / system.webServer/ fastCgi ( Get-IisSitePath ) - Value @ {
168167 FullPath = $Path
169168 }
170169 }
@@ -344,19 +343,19 @@ function Test-TargetResourceImpl
344343 )
345344
346345 $matchedVerbs = @ ()
347- $mismatchVerbs = @ ()
348- foreach ($thisVerb in $resourceStatus.Verb )
346+ $mismatchVerbs = @ ()
347+ foreach ($thisVerb in $resourceStatus.Verb )
349348 {
350349 if ($Verb -icontains $thisVerb )
351350 {
352351 Write-Verbose - Message ($LocalizedData.VerboseTestTargetResourceImplVerb `
353- -f $Verb )
352+ -f $thisVerb )
354353 $matchedVerbs += $thisVerb
355354 }
356355 else
357356 {
358357 Write-Verbose - Message ($LocalizedData.VerboseTestTargetResourceImplExtraVerb `
359- -f $Verb )
358+ -f $thisVerb )
360359 $mismatchVerbs += $thisVerb
361360 }
362361 }
@@ -379,7 +378,7 @@ function Test-TargetResourceImpl
379378 $moduleConfigured = $false
380379 if ($modulePresent -and `
381380 $mismatchVerbs.Count -eq 0 -and `
382- $matchedVerbs.Count - eq $Verb.Count -and `
381+ $matchedVerbs.Count -eq $Verb.Count -and `
383382 $resourceStatus.Path -eq $Path -and `
384383 $resourceStatus.RequestPath -eq $RequestPath )
385384 {
0 commit comments