Get-AzImage
Gets the properties of an image.
Syntax
Get-AzImage
[[-ResourceGroupName] <String>]
[[-ImageName] <String>]
[[-Expand] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzImage cmdlet gets the properties of an image.
Examples
Example 1
Get-AzImage -ResourceGroupName 'ResourceGroup01' -ImageName 'Image01'
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image01
Name : Image01
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
This command gets the properties of the image named 'Image01' in the resource group 'ResourceGroup01'.
Example 2
Get-AzImage -ResourceGroupName 'ResourceGroup01'
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image01
Name : Image01
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image02
Name : Image02
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
This command gets the properties of all images in the resource group 'ResourceGroup01'.
Example 3
Get-AzImage
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image01
Name : Image01
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image02
Name : Image02
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
ResourceGroupName : ResourceGroup02
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup02/prov
iders/Microsoft.Compute/images/Image03
Name : Image03
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
This command gets the properties of all images under the subscription.
Example 4
Get-AzImage -Name "Image*"
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image01
Name : Image01
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
ResourceGroupName : ResourceGroup01
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/prov
iders/Microsoft.Compute/images/Image02
Name : Image02
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
ResourceGroupName : ResourceGroup02
SourceVirtualMachine : Microsoft.Azure.Management.Compute.Models.SubResource
StorageProfile : Microsoft.Azure.Management.Compute.Models.ImageStorageProfile
ProvisioningState : Succeeded
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup02/prov
iders/Microsoft.Compute/images/Image03
Name : Image03
Type : Microsoft.Compute/images
Location : eastus2
Tags : {}
This command gets the properties of all images under the subscription that start with "Image".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Expand
Specifies the expand expression query.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ImageName
Specifies the name of an image.
Type: | String |
Aliases: | Name |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | True |
-ResourceGroupName
Specifies the name of a resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Inputs
Outputs
Azure PowerShell