|
1 | 1 | ---
|
2 |
| -title: Enable VM insights using PowerShell |
3 |
| -description: Describes how to enable VM insights for Azure virtual machines or Virtual Machine Scale Sets using Azure PowerShell. |
| 2 | +title: Enable VM insights by using PowerShell |
| 3 | +description: This article describes how to enable VM insights for Azure virtual machines or virtual machine scale sets by using Azure PowerShell. |
4 | 4 | ms.topic: conceptual
|
5 | 5 | author: bwren
|
6 | 6 | ms.author: bwren
|
7 | 7 | ms.date: 06/08/2022
|
8 | 8 |
|
9 | 9 | ---
|
10 | 10 |
|
11 |
| -# Enable VM insights using PowerShell |
12 |
| -This article describes how to enable VM insights on Azure virtual machines using PowerShell. This procedure can be used for the following: |
| 11 | +# Enable VM insights by using PowerShell |
| 12 | +This article describes how to enable VM insights on Azure virtual machines by using PowerShell. This procedure can be used for: |
13 | 13 |
|
14 |
| -- Azure virtual machine |
15 |
| -- Azure Virtual Machine Scale Set |
| 14 | +- Azure Virtual Machines |
| 15 | +- Azure Virtual Machine Scale Sets |
16 | 16 |
|
17 | 17 | > [!NOTE]
|
18 |
| -> This article only applies to the Log Analytics agent. To enable VM insights with the Azure monitor agent, use other installation methods described in [Enable VM insights overview](vminsights-enable-overview.md). |
| 18 | +> This article only applies to the Log Analytics agent. To enable VM insights with the Azure Monitor agent, use other installation methods described in [Enable VM insights overview](vminsights-enable-overview.md). |
19 | 19 | ## Prerequisites
|
20 | 20 |
|
21 |
| -- [Log Analytics workspace configured for VM insights](../vm/vminsights-configure-workspace.md). |
22 |
| -- See [Supported operating systems](./vminsights-enable-overview.md#supported-operating-systems) to ensure that the operating system of the virtual machine or Virtual Machine Scale Set you're enabling is supported. |
23 |
| -- See [Manage the Azure Monitor agent](../agents/azure-monitor-agent-manage.md#prerequisites) for prerequisites related to Azure Monitor agent. |
| 21 | +You need to: |
| 22 | + |
| 23 | +- [Configure a Log Analytics workspace for VM insights](../vm/vminsights-configure-workspace.md). |
| 24 | +- See [Supported operating systems](./vminsights-enable-overview.md#supported-operating-systems) to ensure that the operating system of the virtual machine or virtual machine scale set you're enabling is supported. |
| 25 | +- See [Manage Azure Monitor Agent](../agents/azure-monitor-agent-manage.md#prerequisites) for prerequisites related to Azure Monitor Agent. |
24 | 26 |
|
25 | 27 | ## PowerShell script
|
26 | 28 |
|
27 |
| -To enable VM insights for multiple VMs or Virtual Machine Scale Sets, use the PowerShell script [Install-VMInsights.ps1](https://www.powershellgallery.com/packages/Install-VMInsights), which is available from the Azure PowerShell Gallery. This script iterates through: |
| 29 | +To enable VM insights for multiple VMs or virtual machine scale set, use the PowerShell script [Install-VMInsights.ps1](https://www.powershellgallery.com/packages/Install-VMInsights). The script is available from the Azure PowerShell Gallery. This script iterates through: |
28 | 30 |
|
29 |
| -- Every virtual machine and Virtual Machine Scale Set in your subscription. |
| 31 | +- Every virtual machine and virtual machine scale set in your subscription. |
30 | 32 | - The scoped resource group that's specified by *ResourceGroup*.
|
31 |
| -- A single VM or Virtual Machine Scale Set that's specified by *Name*. |
| 33 | +- A single VM or virtual machine scale set that's specified by *Name*. |
32 | 34 |
|
33 |
| -For each virtual machine or Virtual Machine Scale Set, the script verifies whether the VM extension for the Log Analytics agent and Dependency agent is already installed. If both extensions are installed, the script tries to reinstall it. If both extensions aren't installed, the script installs them. |
| 35 | +For each virtual machine or virtual machine scale set, the script verifies whether the VM extension for the Log Analytics agent and Dependency agent is already installed. If both extensions are installed, the script tries to reinstall it. If both extensions aren't installed, the script installs them. |
34 | 36 |
|
35 |
| -Verify you're using Azure PowerShell module Az version 1.0.0 or later with `Enable-AzureRM` compatibility aliases enabled. Run `Get-Module -ListAvailable Az` to find the version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-az-ps). If you're running PowerShell locally, you also need to run `Connect-AzAccount` to create a connection with Azure. |
| 37 | +Verify that you're using Azure PowerShell module Az version 1.0.0 or later with `Enable-AzureRM` compatibility aliases enabled. Run `Get-Module -ListAvailable Az` to find the version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-az-ps). If you're running PowerShell locally, you also need to run `Connect-AzAccount` to create a connection with Azure. |
36 | 38 |
|
37 | 39 | To get a list of the script's argument details and example usage, run `Get-Help`.
|
38 | 40 |
|
@@ -187,5 +189,5 @@ Failed: (0)
|
187 | 189 |
|
188 | 190 | ## Next steps
|
189 | 191 |
|
190 |
| -* See [Use VM insights Map](vminsights-maps.md) to view discovered application dependencies. |
| 192 | +* See [Use VM insights Map](vminsights-maps.md) to view discovered application dependencies. |
191 | 193 | * See [View Azure VM performance](vminsights-performance.md) to identify bottlenecks, overall utilization, and your VM's performance.
|
0 commit comments