Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Set-AzFirewall.md #22224

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Network/Network/help/Set-AzFirewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,26 @@ Set-AzFirewall -AzureFirewall $azfw

This example upgrades your existing Azure Firewall Standard to Premium Firewall. Upgrade process may take several minutes and does not require service down time. After upgrade is completed successfully you may replace your exiting standard policy with premium.

### 15: Deallocate and allocate the Firewall with Availability Zones
```powershell
$firewall=Get-AzFirewall -ResourceGroupName rgName -Name azFw
$firewall.Deallocate()
$firewall | Set-AzFirewall

$vnet = Get-AzVirtualNetwork -ResourceGroupName rgName -Name anotherVNetName
$pip = Get-AzPublicIpAddress -ResourceGroupName rgName -Name publicIpName
$firewall.Zones = "1","2","3"
$firewall.Allocate($vnet, $pip)
$firewall | Set-AzFirewall
```

This example retrieves a Firewall, deallocates the firewall, and saves it. The Deallocate command removes the running
service but preserves the firewall's configuration. For changes to be reflected in cloud, Set-AzFirewall must be called.
If user wants to start the service again but with Availability Zones, the Zones method needs to be called defining the desired Availability Zones in quotes and separated by comma. In case Availability Zones needs to be removed, the $null parameter needs to be introduced instead. Finally, the Allocate method should be called on the firewall.
The new VNet and Public IP must be in the same resource group as the Firewall. Again, for changes to be reflected in cloud,
Set-AzFirewall must be called.


## PARAMETERS

### -AsJob
Expand Down