Skip to content

Instantly share code, notes, and snippets.

@renzors
Created November 3, 2017 21:50
Show Gist options
  • Save renzors/757968095f2c05b8b11305713cee9f0c to your computer and use it in GitHub Desktop.
Save renzors/757968095f2c05b8b11305713cee9f0c to your computer and use it in GitHub Desktop.
Allow set a new deployment path before and after of a deployment
#Add-AzureRmAccount
#Get-AzureRmSubscription
#Set-AzureRmContext -SubscriptionName ""
$AzureWebSite = ""
$AzureResourceGroup = ""
$Resource = Get-AzureRmResource -ResourceType "microsoft.web/sites/config" -ResourceGroupName $AzureResourceGroup -ResourceName $AzureWebSite/web -ApiVersion "2016-08-01"
$Resource.Properties.virtualApplications[0].physicalPath = "site\wwwroot\"
$Resource | Set-AzureRmResource -Force -ApiVersion "2016-08-01"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment