Skip to content

Commit b1a7c55

Browse files
committed
reformat article
1 parent 4155a39 commit b1a7c55

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

articles/vpn-gateway/create-custom-policies-p2s-ps.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,27 @@ Verify that your environment meets the following prerequisites:
2626

2727
[!INCLUDE [PowerShell](../../includes/vpn-gateway-cloud-shell-powershell.md)]
2828

29-
## <a name="signin"></a>1. Set variables
29+
## Create and set a policy
3030

31-
Declare the variables that you want to use. Use the following sample, replacing the values for your own when necessary. If you close your PowerShell/Cloud Shell session at any point during the exercise, just copy and paste the values again to redeclare the variables.
31+
1. Declare the variables that you want to use. Use the following sample, replacing the values for your own when necessary. If you close your PowerShell/Cloud Shell session at any point during the exercise, just copy and paste the values again to redeclare the variables.
3232

33-
```azurepowershell-interactive
34-
$RG = "TestRG"
35-
$GWName = "VNet1GW"
36-
```
33+
```azurepowershell-interactive
34+
$RG = "TestRG"
35+
$GWName = "VNet1GW"
36+
```
3737

38-
## <a name="create"></a>2. Create policy object
38+
1. Create a custom IPsec policy object. Adjust the values in the example to meet your requirements.
3939

40-
Create a custom IPsec policy object. You can adjust the values to meet the criteria you require.
40+
```azurepowershell-interactive
41+
$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTime 86471 -SADataSize 429496 -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup2 -PfsGroup PFS2
42+
```
4143

42-
```azurepowershell-interactive
43-
$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTime 86471 -SADataSize 429496 -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup2 -PfsGroup PFS2
44-
```
44+
1. Update your existing P2S VPN gateway and set the IPsec policy.
4545

46-
## <a name="update"></a>3. Update gateway and set policy
47-
48-
In this step, update your existing P2S VPN gateway and set the IPsec policy.
49-
50-
```azurepowershell-interactive
51-
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName $RG -name $GWName
52-
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -VpnClientIpsecPolicy $vpnclientipsecpolicy
53-
```
46+
```azurepowershell-interactive
47+
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName $RG -name $GWName
48+
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -VpnClientIpsecPolicy $vpnclientipsecpolicy
49+
```
5450

5551
## Next steps
5652

0 commit comments

Comments
 (0)