Skip to content

Commit 634adac

Browse files
Merge pull request #238984 from AbdullahBell/patch-73
DDoS Protection: Network Protection PowerShell QuickStart - Updated disable Network Protection Step
2 parents ec1b772 + a7e55c1 commit 634adac

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

articles/ddos-protection/manage-ddos-protection-powershell.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: AbdullahBell
66
ms.service: ddos-protection
77
ms.topic: quickstart
88
ms.workload: infrastructure-services
9-
ms.date: 10/12/2022
9+
ms.date: 05/23/2023
1010
ms.author: abell
1111
ms.custom: devx-track-azurepowershell, mode-api, ignite-2022
1212
---
@@ -74,6 +74,17 @@ $vnet.DdosProtectionPlan.Id = $ddosProtectionPlanID.Id
7474
$vnet.EnableDdosProtection = $true
7575
$vnet | Set-AzVirtualNetwork
7676
```
77+
### Disable DDoS for a virtual network
78+
79+
To disable DDoS protection for a virtual network:
80+
81+
```azurepowershell-interactive
82+
# Gets the most updated version of the virtual network
83+
$vnet = Get-AzVirtualNetwork -Name MyVnet -ResourceGroupName MyResourceGroup
84+
$vnet.DdosProtectionPlan = $null
85+
$vnet.EnableDdosProtection = $false
86+
$vnet | Set-AzVirtualNetwork
87+
```
7788

7889
## Validate and test
7990

@@ -97,17 +108,8 @@ You can keep your resources for the next tutorial. If no longer needed, delete t
97108
Remove-AzResourceGroup -Name MyResourceGroup
98109
```
99110

100-
To disable DDoS protection for a virtual network:
101-
102-
```azurepowershell-interactive
103-
# Gets the most updated version of the virtual network
104-
$vnet = Get-AzVirtualNetwork -Name MyVnet -ResourceGroupName MyResourceGroup
105-
$vnet.DdosProtectionPlan = $null
106-
$vnet.EnableDdosProtection = $false
107-
$vnet | Set-AzVirtualNetwork
108-
```
109-
110-
If you want to delete a DDoS protection plan, you must first dissociate all virtual networks from it.
111+
> [!NOTE]
112+
> If you want to delete a DDoS protection plan, you must first dissociate all virtual networks from it.
111113
112114
## Next steps
113115

0 commit comments

Comments
 (0)