Restore-AzGalleryImageVersion
Restore a soft-deleted gallery image version.
Syntax
Default (Default)
Restore-AzGalleryImageVersion
[-ResourceGroupName] <String>
[-GalleryName] <String>
[-GalleryImageDefinitionName] <String>
[-Name] <String>
-Location <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
Description
Restores a soft-deleted gallery image version during both the retention and grace periods, until HardDeletionTargetTime. After permanent deletion, the version can no longer be restored. -Location must be the version's original home region.
Examples
Example 1
Restore-AzGalleryImageVersion -ResourceGroupName $rgname -GalleryName $galleryName `
-GalleryImageDefinitionName $imageName -Name '1.0.0' -Location 'eastus'
Restore a soft-deleted image version in its original home region.
Parameters
-AsJob
Run cmdlet in the background.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-GalleryImageDefinitionName
The name of the gallery image definition.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: GalleryImageName
Parameter sets
(All)
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GalleryName
The name of the gallery.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Location
The original home region of the gallery image version.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
The name of the gallery image version.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: GalleryImageVersionName
Parameter sets
(All)
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
Outputs