Get-AzImage
Obtém as propriedades de uma imagem.
Sintaxe
Get-AzImage
[[-ResourceGroupName] <String>]
[[-ImageName] <String>]
[[-Expand] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzImage obtém as propriedades de uma imagem.
Exemplos
Exemplo 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 : {}
Esse comando obtém as propriedades da imagem chamada 'Image01' no grupo de recursos 'ResourceGroup01'.
Exemplo 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 : {}
Esse comando obtém as propriedades de todas as imagens no grupo de recursos 'ResourceGroup01'.
Exemplo 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 : {}
Esse comando obtém as propriedades de todas as imagens na assinatura.
Exemplo 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 : {}
Esse comando obtém as propriedades de todas as imagens na assinatura que começam com "Image".
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-Expand
Especifica a consulta de expressão de expansão.
Tipo: | String |
Cargo: | 2 |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-ImageName
Especifica o nome de uma imagem.
Tipo: | String |
Aliases: | Name |
Cargo: | 1 |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | True |
-ResourceGroupName
Especifica o nome de um grupo de recursos.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | True |