Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzGalleryApplicationVersion

Create or update a gallery Application Version.

Syntax

CreateExpanded (Default)

New-AzGalleryApplicationVersion
 -Name <String>
 -GalleryApplicationName <String>
 -GalleryName <String>
 -ResourceGroupName <String>
 -Location <String>
 -Install <String>
 -Remove <String>
 [-SubscriptionId <String>]
 [-DefaultConfigFileLink <String>]
 [-PackageFileLink <String>]
 [-PublishingProfileEndOfLifeDate <DateTime>]
 [-PublishingProfileExcludeFromLatest]
 [-ReplicaCount <Int32>]
 [-Tag <Hashtable>]
 [-TargetRegion <ITargetRegion[]>]
 [-Update <String>]
 [-PackageFileName <String>]
 [-ConfigFileName <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

CreateViaIdentityGalleryExpanded

New-AzGalleryApplicationVersion
 -Name <String>
 -GalleryApplicationName <String>
 -GalleryInputObject <IComputeIdentity>
 -Location <String>
 -Install <String>
 -Remove <String>
 [-DefaultConfigFileLink <String>]
 [-PackageFileLink <String>]
 [-PublishingProfileEndOfLifeDate <DateTime>]
 [-PublishingProfileExcludeFromLatest]
 [-ReplicaCount <Int32>]
 [-Tag <Hashtable>]
 [-TargetRegion <ITargetRegion[]>]
 [-Update <String>]
 [-PackageFileName <String>]
 [-ConfigFileName <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

CreateViaJsonFilePath

New-AzGalleryApplicationVersion
 -Name <String>
 -GalleryApplicationName <String>
 -GalleryName <String>
 -ResourceGroupName <String>
 -JsonFilePath <String>
 [-SubscriptionId <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

CreateViaJsonString

New-AzGalleryApplicationVersion
 -Name <String>
 -GalleryApplicationName <String>
 -GalleryName <String>
 -ResourceGroupName <String>
 -JsonString <String>
 [-SubscriptionId <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

CreateViaIdentityApplicationExpanded

New-AzGalleryApplicationVersion
 -Name <String>
 -ApplicationInputObject <IComputeIdentity>
 -Location <String>
 -Install <String>
 -Remove <String>
 [-DefaultConfigFileLink <String>]
 [-PackageFileLink <String>]
 [-PublishingProfileEndOfLifeDate <DateTime>]
 [-PublishingProfileExcludeFromLatest]
 [-ReplicaCount <Int32>]
 [-Tag <Hashtable>]
 [-TargetRegion <ITargetRegion[]>]
 [-Update <String>]
 [-PackageFileName <String>]
 [-ConfigFileName <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

Create or update a gallery Application Version.

Examples

Example 1: Create a gallery application version.

$ctx = New-AzStorageContext -StorageAccountName $storAccName
$SASToken = New-AzStorageBlobSASToken -Context $ctx -Container $containerName -blob $blobName -Permission r
$storAcc = Get-AzStorageAccount -ResourceGroupName $rgName -Name $storAccName
$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storAcc.Context
$SASToken = New-AzStorageBlobSASToken -Container $containerName -Blob $blobName -Permission rwd -Context $storAcc.Context
$SASUri = $blob.ICloudBlob.Uri.AbsoluteUri + $SASToken
New-AzGalleryApplicationVersion -ResourceGroupName $rgname -Location EastUS -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -name "0.1.0" -PackageFileLink $SASUri -Install "powershell -command 'Expand-Archive -Path package.zip -DestinationPath C:\\package\'" -Remove "del C:\\package"

Creating a Gallery Application Version. Using SAS Uri for the blob for PackageFileLink.

Parameters

-ApplicationInputObject

Identity Parameter

Parameter properties

Type:IComputeIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AsJob

Run the command as a job

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ConfigFileName

Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultConfigFileLink

Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

-GalleryApplicationName

The name of the gallery Application Definition in which the Application Version is to be created.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-GalleryInputObject

Identity Parameter

Parameter properties

Type:IComputeIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-GalleryName

The name of the Shared Application Gallery in which the Application Definition resides.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Install

Required. The path and arguments to install the gallery application. This is limited to 4096 characters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-JsonFilePath

Path of Json file supplied to the Create operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-JsonString

Json string supplied to the Create operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Location

Resource location

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:GalleryApplicationVersionName

Parameter sets

-NoWait

Run the command asynchronously

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PackageFileLink

Required. The mediaLink of the artifact, must be a readable storage page blob.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PackageFileName

Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublishingProfileEndOfLifeDate

The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublishingProfileExcludeFromLatest

If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Remove

Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ReplicaCount

The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

The name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

-Tag

Resource tags

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-TargetRegion

The target regions where the Image Version is going to be replicated to. This property is updatable.

Parameter properties

Type:

ITargetRegion[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Update

Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

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

IComputeIdentity

Outputs

IGalleryApplicationVersion


Feedback

Was this page helpful?