Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Get-AzVMImage
- Module:
- Az.Compute Module
Gets all the versions of a VMImage.
Syntax
ListVMImage
Get-AzVMImage
-Location <String>
-PublisherName <String>
-Offer <String>
-Skus <String>
[-EdgeZone <String>]
[-Top <Int32>]
[-OrderBy <String>]
[-Expand <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetVMImageDetail
Get-AzVMImage
-Location <String>
-PublisherName <String>
-Offer <String>
-Skus <String>
-Version <String>
[-EdgeZone <String>]
[-Expand <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzVMImage cmdlet gets all the versions of a VMImage.
Examples
Example 1: List VM Image objects
Get-AzVMImage -Location "Central US" -PublisherName "MicrosoftWindowsServer" -Offer "windowsserver" -Skus "2025-datacenter"
Version Location PublisherName HyperVGeneration Architecture ImageDeprecationStatus
------- -------- ------------- ---------------- ------------ ----------------------
26100.2033.241004 centralus MicrosoftWindowsServer
26100.2314.241107 centralus MicrosoftWindowsServer
26100.2605.241207 centralus MicrosoftWindowsServer
26100.2894.250113 centralus MicrosoftWindowsServer
26100.3194.250210 centralus MicrosoftWindowsServer
26100.3476.250306 centralus MicrosoftWindowsServer
26100.3775.250406 centralus MicrosoftWindowsServer
This command gets all the versions of VMImage that match the specified values.
Example 2: List VM Image objects with Image Deprecation Status
Get-AzVMImage -Location "Central US" -PublisherName "MicrosoftWindowsServer" -Offer "windowsserver" -Skus "2025-datacenter" -Expand properties/imageDeprecationStatus
Version Location PublisherName HyperVGeneration Architecture ImageDeprecationStatus
------- -------- ------------- ---------------- ------------ ----------------------
26100.2033.241004 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.2314.241107 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.2605.241207 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.2894.250113 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.3194.250210 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.3476.250306 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
26100.3775.250406 centralus MicrosoftWindowsServer V1 x64 Microsoft.Azure.Management.Compute.Mo…
This command gets all the versions of VMImage that match the specified values with image deprecation statuses.
Example 3: Get VMImage object
Get-AzVMImage -Location "Central US" -PublisherName "MicrosoftWindowsServer" -Offer "windowsserver" -Skus "2025-datacenter" -Version 26100.2033.241004
Id : /Subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Providers/Microsoft.Compute/Locations/cent
ralus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/windowsserver/Skus/2025-d
atacenter/Versions/26100.2033.241004
Location : centralus
PublisherName : MicrosoftWindowsServer
Offer : windowsserver
Skus : 2025-datacenter
Version : 26100.2033.241004
FilterExpression :
Name : 26100.2033.241004
HyperVGeneration : V1
OSDiskImage : {
"operatingSystem": "Windows"
}
PurchasePlan : null
DataDiskImages : []
ImageDeprecationStatus : {
"imageState": "Active",
"scheduledDeprecationTime": null,
"alternativeOption": null
}
This command gets a specific version of VMImage that matches the specified values.
Example 4: Get VMImage objects
Get-AzVMImage -Location "Central US" -PublisherName "MicrosoftWindowsServer" -Offer "windowsserver" -Skus "2025-datacenter" -Version 26100.2* -Expand properties
Version Location PublisherName HyperVGeneration Architecture ImageDeprecationStatus
------- -------- ------------- ---------------- ------------ ----------------------
26100.2033.241004 centralus MicrosoftWindowsServer V1 x64
26100.2314.241107 centralus MicrosoftWindowsServer V1 x64
26100.2605.241207 centralus MicrosoftWindowsServer V1 x64
26100.2894.250113 centralus MicrosoftWindowsServer V1 x64
This command gets all the versions of VMImage that match the specified values with filtering over version.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-EdgeZone
Set the extended location name for EdgeZone. If not set, VM Image will be queried from Azure main region. Otherwise it will be queried from the specified extended location
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Expand
The expand expression to apply on the operation. Possible values are: 'properties', and 'properties/imageDeprecationStatus'
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Location
Specifies the location of a VMImage.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Offer
Specifies the type of VMImage offer. To obtain an image offer, use the Get-AzVMImageOffer cmdlet.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-OrderBy
Specifies the order of the results returned. Formatted as an OData query.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublisherName
Specifies the publisher of a VMImage. To obtain an image publisher, use the Get-AzVMImagePublisher cmdlet.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Skus
Specifies a VMImage SKU. To obtain an SKU, use the Get-AzVMImageSku cmdlet.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Top
Specifies the maximum number of virtual machine images returned.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Version
Specifies the version of the VMImage.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | True |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
Outputs
PSVirtualMachineImage
PSVirtualMachineImageDetail
Related Links
Azure PowerShell
Feedback
Was this page helpful?
