Install-VMInsights

1.10.1

This script installs or re-configures the following on VM's and VMSS under a Subscription.
1. Log Analytics VM Extension configured to supply Log Analytics Workspace and Dependency Agent VM Extension.
2. Azure Monitor Agent along with Data Collection Rule association, User Assigned Managed Identity, and Dependency Agent VM Extension (optional).


Scope can further nar
This script installs or re-configures the following on VM's and VMSS under a Subscription.
1. Log Analytics VM Extension configured to supply Log Analytics Workspace and Dependency Agent VM Extension.
2. Azure Monitor Agent along with Data Collection Rule association, User Assigned Managed Identity, and Dependency Agent VM Extension (optional).


Scope can further narrowed down to :
- Resource Group
- Specific VM/VMSS
- Policy Assignment Scope

Script will show you list of VM's/VMSS that will apply to and let you confirm to continue.
Use -Approve Switch to run without prompting, if all required parameters are provided.

If the Log Analyitcs Agent extension is already configured with a workspace, use -ReInstall Switch to update the workspace.
Use -WhatIf to get info about expected effect of the commands in the script.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Install-VMInsights

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Microsoft Corporation. All rights reserved.

Package Details

Author(s)

  • vpidatala@microsoft.com

Functions

CustomerSkip FatalException VirtualMachineException VirtualMachineScaleSetException ResourceGroupDoesNotExist VirtualMachineUnknownException VirtualMachineDoesNotExist VirtualMachineOperationFailed VirtualMachinePoweredDown VirtualMachineExtensionError VirtualMachineScaleSetUnknownException VirtualMachineScaleSetDoesNotExist VirtualMachineScaleSetOperationFailed VirtualMachineScaleSetExtensionError DataCollectionRuleForbidden DataCollectionRuleDoesNotExist DataCollectionRuleIncorrect UserAssignedManagedIdentityDoesNotExist UserAssignedManagedIdentityResourceGroupDoesNotExist UserAssignedManagedIdentityUnknownException PrintSummaryMessage ExtractCloudExceptionErrorMessage ExtractExceptionErrorCode ExtractExceptionPrefixErrCode FormatVmIdentifier FormatVmssIdentifier IsVmAndGuestAgentUpAndHealthy VerboseDisplayException DisplayException GetRgObject PopulateRgHashTableVm PopulateRgHashTableVmss GetVMExtension GetVMssExtension RemoveVMExtension NewDCRAssociationVm NewDCRAssociationVmss RetainExtensionUpgradeSettings OnboardDaVm OnboardAmaVm OnboardLaVmWithReInstall OnboardLaVmWithoutReInstall OnboardVmiWithAmaVm OnboardVmiWithAmaVmss SetManagedIdentityRoles OnboardVMssExtension SetVMExtension UpgradeVmssExtensionManualUpdateEnabled UpdateVMssExtension AssignVmssUserManagedIdentity AssignVmUserManagedIdentity SetManagedIdentityRolesAma

Dependencies

Release Notes

Adds support for using Azure Monitor Agent (AMA).

FileList

Version History

Version Downloads Last updated
1.10.1 (current version) 22,604 12/15/2023
1.9 2,076,986 5/25/2021
1.8 3,428 1/20/2021
1.7 1,236 11/27/2019
1.6 108 10/4/2019
1.5 402 10/4/2019
1.4 88 7/8/2019
1.3 46 5/30/2019
1.2 48 3/19/2019
1.1 79 9/25/2018
1.0 575 9/11/2018
Show more