Get-AzureVMAvailableExtension for ARM #1481 - Closed without Solution
#1481 was closed without a solution. I need a way to find out Extensions that can be used against ARM VM's along with their properties like it was possible with Get-AzureVMAvailableExtension for ASM.
Hi @Vijayaraghavanl,
Currently there are two ways --
-
Because the ARM and ASM modes are merged, now you can directly call
Get-AzureVMAvailableExtensionto do so, without switching the context; -
You can also use the following cmdlet to list available extensions:
Get-AzureRmVMExtensionImage.
Dear huangpf,
- I am now running into this error for Get-AzureVMAvailableExtension while other "Get-" cmdlets works fine without error.
Get-AzureVMAvailableExtension : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription. At line:1 char:1
- Get-AzureVMAvailableExtension
-
- CategoryInfo : CloseError: (:) [Get-AzureVMAvailableExtension], ComputeCloudException
- FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.GetAzureVMAvailableExtensionCommand
- For Get-AzureRmVMExtensionImage "Location" "PublisherName" and "Type" parameters are mandatory parameters. This makes it difficult to use this cmdlet The goal here is to know what extensions and available and details for it. How would I get the answer to "PublisherName" and "Type"?
The older approach was far more easier when the Get-AzureVMAvailableExtension used to work and it would return the list of all extensions without having to provide any parameters and then we were able to pick the extensions we need based on its description.
For ASM, you still need to login there using the following cmdlet:
PS C:\> Get-AzureVMAvailableExtension | ft Publisher,ExtensionName,Version
VERBOSE: 10:52:08 PM - Begin Operation: Get-AzureVMAvailableExtension
VERBOSE: 10:52:11 PM - Completed Operation: Get-AzureVMAvailableExtension
Publisher ExtensionName Version
--------- ------------- -------
AlertLogic. AlertLogicLM 1.3
AlertLogic.Extension AlertLogicLM 1.9
...
BTW, the error I got reminded me to login:
PS C:\> Get-AzureVMAvailableExtension
VERBOSE: 10:48:15 PM - Begin Operation: Get-AzureVMAvailableExtension
Get-AzureVMAvailableExtension : Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.
For ARM, try use other related cmdlets and PS' piping feature:
Get-AzureRmVMImagePublisher -Location westus | Get-AzureRmVMExtensionImageType | Get-AzureRmVMExtensionImage
And with filtering:
Get-AzureRmVMImagePublisher -Location westus | Get-AzureRmVMExtensionImageType | Get-AzureRmVMExtensionImage | ft PublisherName,Type,Version
PublisherName Type Version
------------- ---- -------
alertlogic AlertLogicLM 1.3.0.1
AlertLogic.Extension AlertLogicLM 1.3.0.0
AlertLogic.Extension AlertLogicLM 1.4.0.0
AlertLogic.Extension AlertLogicLM 1.9.0.0
AlertLogic.Extension AlertLogicLM 1.9.1.0
Chef.Bootstrap.WindowsAzure CentosChefClient 11.12.4.2
Chef.Bootstrap.WindowsAzure CentosChefClient 11.14.6.1
...
Dear hungpf,
Thank you! I can now get what I need. While the name Type suggests what the extension may be a description field would be more helpful. Otherwise I pretty much have what I need.
@Vijayaraghavanl Glad it works now.
It's by design that the ARM API doesn't return the information of extension description (yet).
For that you have to call the ASM cmdlet, i.e. Get-AzureVMAvailableExtension.
Can we close this issue now? Thanks.
Dear huangpf,
Thank you for the response. Yes this certainly can be closed now. Thank you again!