Skip to content

Commit 3d95517

Browse files
committed
add tabs
1 parent 07e8c90 commit 3d95517

File tree

1 file changed

+60
-4
lines changed

1 file changed

+60
-4
lines changed

articles/network-watcher/vnet-flow-logs-portal.md

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Manage virtual network flow logs - Azure portal
2+
title: Manage virtual network flow logs
33
titleSuffix: Azure Network Watcher
4-
description: Learn how to create, change, enable, disable, or delete Azure Network Watcher virtual network flow logs using the Azure portal.
4+
description: Learn how to create, change, enable, disable, or delete Azure Network Watcher virtual network flow logs.
55
author: halkazwini
66
ms.author: halkazwini
77
ms.service: azure-network-watcher
88
ms.topic: how-to
9-
ms.date: 07/26/2024
9+
ms.date: 03/14/2025
1010

1111
#CustomerIntent: As an Azure administrator, I want to log my virtual network IP traffic using Network Watcher VNet flow logs so that I can analyze it later.
1212
---
@@ -19,16 +19,52 @@ In this article, you learn how to create, change, enable, disable, or delete a v
1919

2020
## Prerequisites
2121

22-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22+
# [**Portal**](#tab/portal)
23+
24+
An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2325

2426
- Insights provider. For more information, see [Register Insights provider](#register-insights-provider).
2527

2628
- A virtual network. If you need to create a virtual network, see [Create a virtual network using the Azure portal](../virtual-network/quick-create-portal.md?toc=/azure/network-watcher/toc.json).
2729

2830
- An Azure storage account. If you need to create a storage account, see [Create a storage account using the Azure portal](../storage/common/storage-account-create.md?tabs=azure-portal&toc=/azure/network-watcher/toc.json).
2931

32+
# [**PowerShell**](#tab/powershell)
33+
34+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
35+
36+
- Insights provider. For more information, see [Register Insights provider](#register-insights-provider).
37+
38+
- A virtual network. If you need to create a virtual network, see [Create a virtual network using PowerShell](../virtual-network/quick-create-powershell.md).
39+
40+
- An Azure storage account. If you need to create a storage account, see [Create a storage account using PowerShell](../storage/common/storage-account-create.md?tabs=azure-powershell).
41+
42+
- PowerShell environment in [Azure Cloud Shell](https://shell.azure.com) or Azure PowerShell installed locally. To learn more about using PowerShell in Azure Cloud Shell, see [Azure Cloud Shell Quickstart - PowerShell](../cloud-shell/quickstart-powershell.md).
43+
44+
- If you choose to install and use PowerShell locally, this article requires the Azure PowerShell version 7.4.0 or later. Run `Get-InstalledModule -Name Az` to find the installed version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-Az-ps). Run `Connect-AzAccount` to sign in to Azure.
45+
46+
# [**Azure CLI**](#tab/cli)
47+
48+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
49+
50+
- Insights provider. For more information, see [Register Insights provider](#register-insights-provider).
51+
52+
- A virtual network. If you need to create a virtual network, see [Create a virtual network using the Azure CLI](../virtual-network/quick-create-cli.md).
53+
54+
- An Azure storage account. If you need to create a storage account, see [Create a storage account using the Azure CLI](../storage/common/storage-account-create.md?tabs=azure-cli).
55+
56+
- Azure Cloud Shell or Azure CLI.
57+
58+
The steps in this article run the Azure CLI commands interactively in [Azure Cloud Shell](/azure/cloud-shell/overview). To run the commands in the Cloud Shell, select **Open Cloud Shell** at the upper-right corner of a code block. Select **Copy** to copy the code, and paste it into Cloud Shell to run it. You can also run the Cloud Shell from within the Azure portal.
59+
60+
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. This article requires the Azure CLI version 2.39.0 or later. Run [az --version](/cli/azure/reference-index#az-version) command to find the installed version. If you run Azure CLI locally, sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
61+
62+
---
63+
3064
## Register Insights provider
3165

66+
# [**Portal**](#tab/portal)
67+
3268
*Microsoft.Insights* provider must be registered to successfully log traffic flowing through a virtual network. If you aren't sure if the *Microsoft.Insights* provider is registered, check its status in the Azure portal by following these steps:
3369

3470
1. In the search box at the top of the portal, enter *subscriptions*. Select **Subscriptions** from the search results.
@@ -45,6 +81,26 @@ In this article, you learn how to create, change, enable, disable, or delete a v
4581

4682
:::image type="content" source="./media/vnet-flow-logs-portal/register-microsoft-insights.png" alt-text="Screenshot that shows how to register Microsoft Insights provider in the Azure portal.":::
4783

84+
# [**PowerShell**](#tab/powershell)
85+
86+
*Microsoft.Insights* provider must be registered to successfully log traffic in a virtual network. If you aren't sure if the *Microsoft.Insights* provider is registered, use [Register-AzResourceProvider](/powershell/module/az.resources/register-azresourceprovider) to register it.
87+
88+
```azurepowershell-interactive
89+
# Register Microsoft.Insights provider.
90+
Register-AzResourceProvider -ProviderNamespace Microsoft.Insights
91+
```
92+
93+
# [**Azure CLI**](#tab/cli)
94+
95+
*Microsoft.Insights* provider must be registered to successfully log traffic in a virtual network. If you aren't sure if the *Microsoft.Insights* provider is registered, use [az provider register](/cli/azure/provider#az-provider-register) to register it.
96+
97+
```azurecli-interactive
98+
# Register Microsoft.Insights provider.
99+
az provider register --namespace Microsoft.Insights
100+
```
101+
102+
---
103+
48104
## Create a flow log
49105

50106
Create a flow log for your virtual network, subnet, or network interface. This flow log is saved in an Azure storage account.

0 commit comments

Comments
 (0)