How To Create An Azure Digital Community Gateway Utilizing PowerShell
If we’ve got an present Digital Community Gateway for VPN, and after we try to create an extra Gateway for ExpressRoute, we’ll get an error referred to as “in use,” so we cannot create one other Digital Community Gateway within the Azure portal. On this article, we’ll learn to resolve this situation utilizing Azure PowerShell.
Why are we getting this type of error?
If our Gateway Subnet tackle area is like /28, we’ll get this type of error.
Within the Article Useful resource Group at present, we’ve got a Digital Community Gateway for VPN, now we’ll create an extra Digital Community Gateway for ExpressRoute, so click on Create.
Within the Create Digital Community Gateway web page, we’ve got to pick the under particulars
- Area – Choose our Useful resource group area
- Gateway sort – ExpressRoute
- Gateway SKU – Commonplace
- Digital Community – Choose an present Community
Now we received the error.
Obtain this script and modify it as your requirement.
- Join-AzAccount – to attach the Azure account
- Choose-AzSubscription “Enter your Subscription Identify”
- $RG = “Useful resource group title”
- $Location = “Useful resource group location”
- $GWName = “Digital Community Gateway title”
- $GWIPName = “Digital Community Gateway Public IP tackle title”
- $GWIPconfName = “Digital Community Gateway IP configure title”
- $VNetName = “Digital Community title”
- $gwsubprefix = “GatewaySubnet tackle”
Open the PowerShell ISE and run the script.
The extra Digital community gateway is created below the Useful resource group.