Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Defender for Cloud Cookbook

You're reading from  Microsoft Defender for Cloud Cookbook

Product type Book
Published in Jul 2022
Publisher Packt
ISBN-13 9781801076135
Pages 314 pages
Edition 1st Edition
Languages
Author (1):
Sasha Kranjac Sasha Kranjac
Profile icon Sasha Kranjac
Toc

Table of Contents (12) Chapters close

Preface 1. Chapter 1: Getting Started with Microsoft Defender for Cloud 2. Chapter 2: Multi-Cloud Connectivity 3. Chapter 3: Workflow Automation and Continuous Export 4. Chapter 4: Secure Score and Recommendations 5. Chapter 5: Security Alerts 6. Chapter 6: Regulatory Compliance and Security Policy 7. Chapter 7: Microsoft Defender for Cloud Workload Protection 8. Chapter 8: Firewall Manager 9. Chapter 9: Information Protection 10. Chapter 10: Workbooks 11. Other Books You May Enjoy

Creating an Azure firewall policy using PowerShell

You can create an Azure firewall policy and rules using different tools: Azure Firewall Manager, PowerShell, CLI, and REST API. In this recipe, you will create an Azure firewall policy and policy rules using PowerShell.

Getting ready

Open your preferred PowerShell tool – this could be Visual Studio Code, Windows PowerShell ISE, the PowerShell console, or something else.

Sign in to your Azure account: Connect-AzAccount.

How to do it…

To create an Azure firewall policy and policy rules using PowerShell, complete the following steps:

  1. Define firewall policy resources:
    $RGName="Firewall"
    $Location="West Europe"
    $fwPolicyName="FW-policy"
    $netCollName="NetworkCollectionGroup"
    $netRuleName="AllowGoogleDNS"
    $appCollName="AppCollectionGroup"
    $appRuleName="Allow-Packt"
  2. Create a resource group:
    New-AzResourceGroup -Name $RGName -Location...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime