diff --git a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementApiPolicy.ps1 b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementApiPolicy.ps1 index 52aa9702..3816a545 100644 --- a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementApiPolicy.ps1 +++ b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementApiPolicy.ps1 @@ -2,7 +2,7 @@ param( [Parameter(Mandatory = $true)][string] $ResourceGroupName, [Parameter(Mandatory = $true)][string] $ServiceName, [Parameter(Mandatory = $true)][string] $ApiId, - [Parameter(Mandatory = $true)][string] $policyFilePath + [Parameter(Mandatory = $true)][string] $PolicyFilePath ) $apim = Get-AzApiManagement -ResourceGroupName $ResourceGroupName -Name $ServiceName @@ -12,7 +12,7 @@ if ($apim -eq $null) { $apimContext = New-AzApiManagementContext -ResourceGroupName $ResourceGroupName -ServiceName $ServiceName Write-Host "Updating policy of API '$ApiId'" -$result = Set-AzApiManagementPolicy -Context $apimContext -ApiId $ApiId -PolicyFilePath $policyFilePath +$result = Set-AzApiManagementPolicy -Context $apimContext -ApiId $ApiId -PolicyFilePath $PolicyFilePath -PassThru if ($result) { Write-Host "Successfully updated API policy" } else { diff --git a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementOperationPolicy.ps1 b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementOperationPolicy.ps1 index 6b68494c..2a34db6c 100644 --- a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementOperationPolicy.ps1 +++ b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementOperationPolicy.ps1 @@ -13,7 +13,7 @@ if ($apim -eq $null) { $apimContext = New-AzApiManagementContext -ResourceGroupName $ResourceGroupName -ServiceName $ServiceName Write-Host "Updating policy of the operation '$OperationId' in API '$ApiId'" -$result = Set-AzApiManagementPolicy -Context $apimContext -ApiId $ApiId -OperationId $OperationId -PolicyFilePath $PolicyFilePath +$result = Set-AzApiManagementPolicy -Context $apimContext -ApiId $ApiId -OperationId $OperationId -PolicyFilePath $PolicyFilePath -PassThru if ($result) { Write-Host "Successfully updated the operation policy" } else { diff --git a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementProductPolicy.ps1 b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementProductPolicy.ps1 index f65d0122..4d11648f 100644 --- a/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementProductPolicy.ps1 +++ b/src/Arcus.Scripting.ApiManagement/Scripts/Import-AzApiManagementProductPolicy.ps1 @@ -12,7 +12,7 @@ if ($apim -eq $null) { $apimContext = New-AzApiManagementContext -ResourceGroupName $ResourceGroupName -ServiceName $ServiceName Write-Host "Updating policy of product '$ProductId'" -$result = Set-AzApiManagementPolicy -Context $apimContext -ProductId $ProductId -PolicyFilePath $PolicyFilePath +$result = Set-AzApiManagementPolicy -Context $apimContext -ProductId $ProductId -PolicyFilePath $PolicyFilePath -PassThru if ($result) { Write-Host "Successfully updated the product policy" } else {