編集

次の方法で共有


Remove-AzVmGalleryApplication

Remove a VMGalleryApplication object from the PSVirtualMachine object.

Syntax

Remove-AzVmGalleryApplication
      -VM <PSVirtualMachine>
      -GalleryApplicationsReferenceId <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Removes a VMGalleryApplication object from the PSVirtualMachine object.

Examples

Example 1

$vm = Get-AzVM -ResourceGroupName $rgname -Name $vmName
Remove-AzVmGalleryApplication -VM $vm -GalleryApplicationsReferenceId $refId

Remove gallery application by reference Id

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

-GalleryApplicationsReferenceId

Package Reference Id of the Gallery Application to delete.

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

-VM

The PSVirtualMachine object to delete a Gallery Application Reference ID from.

Type:PSVirtualMachine
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

Outputs

PSVirtualMachine