Get-AzureRmVMImage
Gets all the versions of a VMImage.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmVMImage
-Location <String>
-PublisherName <String>
-Offer <String>
-Skus <String>
[-FilterExpression <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmVMImage
-Location <String>
-PublisherName <String>
-Offer <String>
-Skus <String>
-Version <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmVMImage cmdlet gets all the versions of a VMImage.
Examples
Example 1: Get VMImage objects
PS C:\> Get-AzureRmVMImage -Location "Central US" -PublisherName "MicrosoftWindowsServer" -Offer "windowsserver" -Skus "2012-R2-Datacenter"
This command gets all the versions of VMImage that match the specified values.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilterExpression
Specifies a filter expression.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Specifies the location of a VMImage.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Offer
Specifies the type of VMImage offer. To obtain an image offer, use the Get-AzureRmVMImageOffer cmdlet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PublisherName
Specifies the publisher of a VMImage. To obtain an image publisher, use the Get-AzureRmVMImagePublisher cmdlet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Skus
Specifies a VMImage SKU. To obtain an SKU, use the Get-AzureRmVMImageSku cmdlet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Version
Specifies the version of the VMImage.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |