你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Add-AzVmssGalleryApplication
Add a GalleryApplication object to the PSVirtualMachineProfile object.
Syntax
Add-AzVmssGalleryApplication
-VirtualMachineScaleSetVM <PSVirtualMachineScaleSetVMProfile>
-GalleryApplication <PSVMGalleryApplication>
[-TreatFailureAsDeploymentFailure]
[-Order <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Adds a GalleryApplication object to the PSVirtualMachineProfile object.
Examples
Example 1
$vmss = Get-AzVmss -ResourceGroupName $rgName -Name $vmssName
$vmGal = New-AzVmssGalleryApplication -PackageReferenceId $packageRefId -ConfigReferenceId $configRefId
Add-AzVmssGalleryApplication -VirtualMachineScaleSetVM $vmss.VirtualMachineProfile -GalleryApplication $vmGal -Order 1
This example creates a local VMGalleryApplication object and adds it to a PSVirtualMachineScaleSetVM object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GalleryApplication
VM Gallery Application Object.
Type: | PSVMGalleryApplication |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Order
Order in which the application will be install in.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TreatFailureAsDeploymentFailure
If true, any failure for any operation in the VmApplication will fail the deployment. Defaults to false if not specified.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualMachineScaleSetVM
The PSVirtualMachineScaleSetVMProfile object to add a Gallery Application Reference ID.
Type: | PSVirtualMachineScaleSetVMProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None