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 : {}
Este 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 : {}
Este 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 : {}
Este comando obtém as propriedades de todas as imagens sob a 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 : {}
Este comando obtém as propriedades de todas as imagens sob a assinatura que começam com "Imagem".
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 |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-Expand
Especifica a consulta de expressão expandida.
Tipo: | String |
Position: | 2 |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ImageName
Especifica o nome de uma imagem.
Tipo: | String |
Aliases: | Name |
Position: | 1 |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | True |
-ResourceGroupName
Especifica o nome de um grupo de recursos.
Tipo: | String |
Position: | 0 |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | True |
Entradas
Saídas
Azure PowerShell