Install-VMInsights

1.10.4

This script installs or re-configures the following on VM's and VMSS under a Subscription.
Azure Monitor Agent along with Data Collection Rule association and User Assigned Managed Identity.


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
This script installs or re-configures the following on VM's and VMSS under a Subscription.
Azure Monitor Agent along with Data Collection Rule association and User Assigned Managed Identity.


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.

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)

  • mithomps@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 OnboardAmaVm OnboardVmiWithAmaVm OnboardVmiWithAmaVmss SetManagedIdentityRoles OnboardVMssExtension SetVMExtension UpgradeVmssExtensionManualUpdateEnabled UpdateVMssExtension Get-MissingUserAssignedIdentities Format-UamiForDisplay Handle-FailedIdentityOperation AssignVmssUserManagedIdentity AssignVmUserManagedIdentity SetManagedIdentityRolesAma

Dependencies

Release Notes

Remove Legacy Agent (LA/MMA/OMS) support. AMA is now the only supported onboarding path.
Remove Dependency Agent (DA) support. -ProcessAndDependencies now throws a retirement error.

FileList

Version History

Version Downloads Last updated
1.10.4 (current version) 304 6/25/2026
1.10.3 564 12/17/2025
1.10.2 3,140 7/23/2024
1.10.1 28,708 12/15/2023
1.9 2,077,005 5/25/2021
1.8 3,440 1/20/2021
1.7 1,250 11/27/2019
1.6 120 10/4/2019
1.5 415 10/4/2019
1.4 101 7/8/2019
1.3 56 5/30/2019
1.2 59 3/19/2019
1.1 88 9/25/2018
1.0 584 9/11/2018
Show more