New-AzVmGalleryApplication

Create a local PSVMGalleryApplication object.

Note

This is the previous version of our documentation. Please consult the most recent version for up-to-date information.

Syntax

New-AzVmGalleryApplication
   -PackageReferenceId <String>
   [-ConfigReferenceId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Creates a local PSVMGalleryApplication object.

Examples

Example 1

$vm = Get-AzVm -ResourceGroupName $rgName -Name $vmName
$vmGal = New-AzVmGalleryApplication -PackageReferenceId $packageRefId -ConfigReferenceId $configRefId
Add-AzVmGalleryApplication -VM $vm -GalleryApplication $vmGal -Order 1

This example creates a local VMGalleryApplication object and adds it to a PSVirtualMachine object.

Parameters

-ConfigReferenceId

Configuration Reference Id of the Gallery Application.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PackageReferenceId

Package Reference Id of the Gallery Application.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSVMGalleryApplication