Get-AzStackHCIVMImage

Gets a gallery image

Syntax

Get-AzStackHCIVMImage
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [-NoWait]
   [<CommonParameters>]
Get-AzStackHCIVMImage
   [-SubscriptionId <String[]>]
   -Name <String>
   -ResourceGroupName <String>
   [-DefaultProfile <PSObject>]
   [-NoWait]
   [<CommonParameters>]
Get-AzStackHCIVMImage
   [-SubscriptionId <String[]>]
   -ResourceGroupName <String>
   [-DefaultProfile <PSObject>]
   [-NoWait]
   [<CommonParameters>]
Get-AzStackHCIVMImage
   [-SubscriptionId <String[]>]
   -ResourceId <String>
   [-DefaultProfile <PSObject>]
   [-NoWait]
   [<CommonParameters>]

Description

Gets a gallery image

Examples

Example 1: Get an Image

Get-AzStackHCIVMImage -Name "testimage" -ResourceGroupName "test-rg"

Name            ResourceGroupName
----            -----------------
testImage       test-rg

This command gets a specific image in the specified resource group.

Example 2: List all Images in a Resource Group

Get-AzStackHCIVMImage -ResourceGroupName 'test-rg'

Name            ResourceGroupName
----            -----------------
testImage       test-rg

This command lists all images in the specified resource group.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the image

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The ARM Resource Id of the Image

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IGalleryImages

IMarketplaceGalleryImages