Skip to content

Commit ad7882e

Browse files
committed
routing pref for prefxies in ps
1 parent bb3f114 commit ad7882e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

articles/virtual-network/ip-services/create-public-ip-prefix-powershell.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ The removal of the **`-Zone`** parameter in the command is valid in all regions.
109109

110110
The removal of the **`-Zone`** parameter is the default selection for standard public IP addresses in regions without [Availability Zones](../../availability-zones/az-overview.md?toc=%2fazure%2fvirtual-network%2ftoc.json#availability-zones).
111111

112+
# [**Routing Preference Internet IPv4 prefix**](#tab/ipv4-routing-pref)
113+
114+
To create a IPv4 public IP prefix, enter **IPv4** in the **`-IpAddressVersion`** parameter. Remove the **`-Zone`** parameter to create a non-zonal IP prefix.
115+
116+
```azurepowershell-interactive
117+
$tagproperty = @{
118+
IpTagType = 'RoutingPreference'
119+
Tag = 'Internet'
120+
}
121+
$routingprefinternettag = New-Object -TypeName Microsoft.Azure.Commands.Network.Models.PSPublicIpPrefixTag -Property $tagproperty
122+
$ipv4 =@{
123+
Name = 'myPublicIpPrefix-routingprefinternet'
124+
ResourceGroupName = 'QuickStartCreateIPPrefix-rg'
125+
Location = 'eastus2'
126+
PrefixLength = '28'
127+
IpAddressVersion = 'IPv4'
128+
IpTag = $routingprefinternettag
129+
}
130+
New-AzPublicIpPrefix @ipv4
131+
```
112132
---
113133

114134
## IPv6

0 commit comments

Comments
 (0)