Unable to add the APM Insight extension for Azure classic VMs in the new portal

Unable to add the APM Insight extension for Azure classic VMs in the new portal

While trying to add APM Insight Extension in classic VMs through the Azure portal, you may get the following error:

Extension with publisher 'Site24x7', type 'Site24x7APMInsightExtn', and type handler version '1.0' could not be found in the extension repository. (Code: ArtifactNotFound) 

In such cases, the extension can be added via PowerShell scripts. To add the extension from PowerShell command line, use the following commands. 

$vmObject = (Get-AzureVM -ServiceName <serviceName of Azure classic VM> -Name <name of classic VM>)

Set-AzureVMExtension -Publisher Site24x7 -ExtensionName Site24x7ApmInsightExtn -Version 1.2 -ReferenceName Site24x7ApmInsightExtn -PublicConfiguration '{"site24x7LicenseKey":"<your license key>"}' -VM $vmObject  -Verbose
 
$vmObject -Verbose -Debug | Update-AzureVM 

If you require further support write to us at support@site24x7.com. Please send us the output of these commands and or the audit logs for troubleshooting.