Compartilhar via


Get-AzureVMImage

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Get-AzureVMImage

Returns an operating system image object.

Syntax

Parameter Set: Default
Get-AzureVMImage [[-ImageName] <String> ] [ <CommonParameters>]

Detailed Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The Get-AzureVMImage cmdlet returns an operating system image object with information on one or more operating system images stored in the image repository.

The cmdlet returns information for all images in the repository, or about a specific image if its image name is provided.

Parameters

-ImageName<String>

Specifies the name of the image in the image repository.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1

This command retrieves the "MyOSImage" image object from the current image repository.

C:\PS> Get-AzureVMImage -ImageName MyOSImage

Example 2

This command retrieves all the images from the current image repository.

C:\PS> Get-AzureVMImage

Example 3

This command sets the subscription context and then retrieves all the images from the image repository.

C:\PS> $subsId = <MySubscriptionID>
C:\PS> $cert = Get-AzureCertificate cert:\LocalMachine\MY\<CertificateThumbprint>
C:\PS> $MyOSImages = Get-AzureVMImage

Add-AzureVMImage

Remove-AzureVMImage

Update-AzureVMImage

Manage Virtual Machines Using Azure Cmdlets

Manage Images and Disks Using Azure Cmdlets