About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_tools
⚠️
windows_first
Summary:
Although the documentation is focused on managing the Network Watcher Agent VM extension for Linux, there is a notable emphasis on PowerShell usage, which is traditionally a Windows-centric tool. PowerShell is presented as a primary automation/scripting method alongside Azure CLI, and instructions for deploying ARM templates reference Azure PowerShell before Azure CLI. There is also a minor error in the Azure CLI install example referencing 'Network Watcher Agent for Windows' instead of Linux. No Linux-native tools or shell scripting examples (e.g., Bash) are provided, and the documentation assumes the use of Azure-specific tools rather than generic Linux administration patterns.
Recommendations:
- Provide Bash shell script examples for common operations (install, list, uninstall) using Azure CLI, to better align with Linux administrator workflows.
- When listing automation options, present Azure CLI before PowerShell, as CLI is cross-platform and more familiar to Linux users.
- Clarify that PowerShell is available cross-platform, but highlight that Azure CLI is often preferred for Linux environments.
- Correct the minor error in the Azure CLI install example that refers to 'Network Watcher Agent for Windows' instead of Linux.
- Consider including examples of how to automate extension management using native Linux tools (e.g., curl with Azure REST API) for advanced users.
- Explicitly state that no Linux-native package management (apt, yum, etc.) is involved, to avoid confusion.
Create pull request
Flagged Code Snippets
The output of the cmdlet lists the installed extensions:
# [**Resource Manager**](#tab/arm)
N/A
---
## Install Network Watcher Agent VM extension
# [**Portal**](#tab/portal)
From the virtual machine page in the Azure portal, you can install the Network Watcher Agent VM extension by following these steps:
1. Under **Settings**, select **Extensions + applications**.
1. Select **+ Add** and search for **Network Watcher Agent** and install it. If the extension is already installed, you can see it in the list of extensions.
:::image type="content" source="./media/network-watcher-agent-linux/vm-extensions.png" alt-text="Screenshot that shows the VM's extensions page in the Azure portal." lightbox="./media/network-watcher-agent-linux/vm-extensions.png":::
1. In the search box of **Install an Extension**, enter *Network Watcher Agent for Linux*. Select the extension from the list and select **Next**.
:::image type="content" source="./media/network-watcher-agent-linux/install-extension-linux.png" alt-text="Screenshot that shows how to install Network Watcher Agent for Linux in the Azure portal." lightbox="./media/network-watcher-agent-linux/install-extension-linux.png":::
1. Select **Review + create** and then select **Create**.
# [**PowerShell**](#tab/powershell)
Use [Set-AzVMExtension](/powershell/module/az.compute/set-azvmextension) cmdlet to install Network Watcher Agent VM extension on the virtual machine:
---
## Uninstall Network Watcher Agent VM extension
# [**Portal**](#tab/portal)
From the virtual machine page in the Azure portal, you can uninstall the Network Watcher Agent VM extension by following these steps:
1. Under **Settings**, select **Extensions + applications**.
1. Select **AzureNetworkWatcherExtension** from the list of extensions, and then select **Uninstall**.
:::image type="content" source="./media/network-watcher-agent-linux/uninstall-extension-linux.png" alt-text="Screenshot that shows how to uninstall Network Watcher Agent for Linux in the Azure portal." lightbox="./media/network-watcher-agent-linux/uninstall-extension-linux.png":::
> [!NOTE]
> You might see Network Watcher Agent VM extension named differently than **AzureNetworkWatcherExtension**.
# [**PowerShell**](#tab/powershell)
Use [Remove-AzVMExtension](/powershell/module/az.compute/remove-azvmextension) cmdlet to remove Network Watcher Agent VM extension from the virtual machine: