하나의 VM을 여러 Application Gateway의 Backend Pool에 추가하는 PowerShell Script입니다.
VM NIC의 ApplicationGatewayBackendAddressPools에 Application Gateway의 BackendPool을 추가하는 방식입니다.
$appgw1 = Get-AzApplicationGateway -ResourceGroupName $APPGWRG1 -Name $APPGWNAME1
$backendPool1 = Get-AzApplicationGatewayBackendAddressPool -Name $BACKENDPOOLNAME1 -ApplicationGateway $appgw1
$appgw2 = Get-AzApplicationGateway -ResourceGroupName $APPGWRG2 -Name $APPGWNAME2
$backendPool2 = Get-AzApplicationGatewayBackendAddressPool -Name $BACKENDPOOLNAME2 -ApplicationGateway $appgw2
$vm = Get-AzVM -ResourceGroupName $VMRG -Name $VMNAME
$nic = Get-AzNetworkInterface -ResourceId $vm.NetworkProfile.NetworkInterfaces[0].Id
$nic.IpConfigurations[0].ApplicationGatewayBackendAddressPools.Add($backendpool1)
$nic.IpConfigurations[0].ApplicationGatewayBackendAddressPools.Add($backendpool2)
$nic | set-AzNetworkInterface
'Microsoft > Azure' 카테고리의 다른 글
Application Gateway Stop/Start PowerShell (0) | 2021.08.18 |
---|---|
Application Gateway - X-Forwarded-For 헤더에서 Port 정보 제거 (0) | 2021.08.07 |
Recovery Service Vault 삭제 오류 해결 방법 (Soft Delete) (0) | 2021.07.14 |
Azcopy 로그인에 App Registration (Service principal) 사용 (0) | 2021.06.08 |
SQL Always-on 가용성 그룹 구성 후 동기화 오류 (Data synchronization state of some availability database is not healthy.) (0) | 2021.04.25 |