How to list VM extensions in Azure Stack Hub using PowerShell
This document explains how to list VM extensions in Azure Stack Hub with PowerShell.
Prerequisites
Before you begin, ensure your PowerShell environment is set up as detailed in Configure the Azure Stack Hub user's PowerShell environment.
Declare variables
Enter details below to provide values for the variables in the scripts in this article:
Variable name | Variable description | Input |
---|---|---|
$ArmEndpoint | The Azure Resource Manager endpoint for Azure Stack Hub |
Instructions
From your Powershell window run:
# Declare endpoint
$ArmEndpoint = ""
# Register an Az environment that targets your Azure Stack Hub instance
Add-AzEnvironment -Name "AzureStackUser" -ArmEndpoint $ArmEndpoint
# Sign in to your environment
Connect-AzAccount -Environment "AzureStackUser"
# Get location of Azure Stack Hub
$Location = (Get-AzLocation).Location
# Retrieve VM extension list
Get-AzVmImagePublisher -Location $Location | `
Get-AzVMExtensionImageType | `
Get-AzVMExtensionImage | `
Format-Table -Property Type, Version -AutoSize
This will produce a table similar to the following:
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.