• Improve this Doc

    Show / Hide Table of Contents

    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 = "https://management.frn00006.azure.ukcloud.com"
    
    # 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:

    List Azure Stack Hub VM Extensions Output

    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.

    ☀
    ☾
    Generated by DocFX
    Back to top
    © UKCloud Ltd, 2022. All Rights Reserved.
    Privacy Policy. Terms of Use. Contribute.

    The UKCloud Knowledge Centre uses cookies to ensure that we give you the best experience on our website. If you continue we assume that you consent to receive all cookies on this website.