Skip to content

Commit

Permalink
Fix to placement of get call in set method
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianFarnhill committed Oct 1, 2015
1 parent f2b460a commit 2b417f6
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,12 @@ function Set-TargetResource

Write-Verbose -Message "Creating the managed path $RelativeUrl in $WebAppUrl"

Invoke-xSharePointCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock {
$params = $args[0]


$path = Get-TargetResource @params -ErrorAction SilentlyContinue
$path = Get-TargetResource @PSBoundParameters

if ($params.ContainsKey("InstallAccount")) { $params.Remove("InstallAccount") | Out-Null }
if ($null -eq $path) {
Invoke-xSharePointCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock {
$params = $args[0]

if ($null -eq $path) {

$newParams = @{}
if ($params.HostHeader) {
$newParams.Add("HostHeader", $params.HostHeader)
Expand Down

0 comments on commit 2b417f6

Please sign in to comment.