Skip to content

Instantly share code, notes, and snippets.

@stephenweinrich
Created July 12, 2018 17:47
Show Gist options
  • Save stephenweinrich/1d22e0caed7c4b64d7c326f0bb95433d to your computer and use it in GitHub Desktop.
Save stephenweinrich/1d22e0caed7c4b64d7c326f0bb95433d to your computer and use it in GitHub Desktop.
enabling http2
# Signing into azure with principal account
$clientID = "<--client-id-->"
$key= "<--secret-key-->"
$SecurePassword = $key | ConvertTo-SecureString -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential ` -argumentlist $clientID, $SecurePassword
Add-AzureRmAccount -Credential $cred -Tenant "<--tenant-id-->" -ServicePrincipal
# Selecting Subscription
Select-AzureRmSubscription "<--subscription-id-->"
# enabled HTTP2 on app gateway
$gw = Get-AzureRmApplicationGateway -Name "<--application-gateway-name-->" -ResourceGroupName "<--resource-group-name-->"
$gw.EnableHttp2 = $true
Set-AzureRmApplicationGateway -ApplicationGateway $gw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment