Skip to content

Instantly share code, notes, and snippets.

@dipolimene
Forked from charotAmine/deployPolicy.ps1
Created August 16, 2021 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dipolimene/7c679c246dedb4faf8ce8cc5afdfca85 to your computer and use it in GitHub Desktop.
Save dipolimene/7c679c246dedb4faf8ce8cc5afdfca85 to your computer and use it in GitHub Desktop.
$ServiceName= $env:apimInstanceName
$ResourceGroupName = $env:resourceGroupName
$policyFile = "$PSScriptRoot\myPolicy.xml"
$apimContext = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $ServiceName
Set-AzureRmApiManagementPolicy -Context $apimContext -PolicyFilePath $policyFile -ProductId "testpolicy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment