Install-VMInsights

1.10.2

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

Addressed an issue with using a User Assigned Managed Identity
when a VM or VMSS already has a System or User Assigned Managed Identity.

FileList

Version History

Version Downloads Last updated
1.10.2 (current version) 1,095 7/23/2024
1.10.1 28,644 12/15/2023
1.9 2,076,993 5/25/2021
1.8 3,431 1/20/2021
1.7 1,239 11/27/2019
1.6 111 10/4/2019
1.5 405 10/4/2019
1.4 91 7/8/2019
1.3 49 5/30/2019
1.2 51 3/19/2019
1.1 82 9/25/2018
1.0 578 9/11/2018
Show more