Remove-CMAppVVirtualEnvironment

Removes an App-V virtual environment.

Syntax

Remove-CMAppVVirtualEnvironment
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -Id <Int32[]>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMAppVVirtualEnvironment [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -InputObject  [-WhatIf] []
Remove-CMAppVVirtualEnvironment [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -Name  [-WhatIf] []

Description

The Remove-CMAppVVirtualEnvironment cmdlet removes one or more Microsoft Application Virtualization (App-V) virtual environment objects from Microsoft System Center Configuration Manager. You can specify App-V virtual environments by name or ID, or you can provide an App-V virtual environment object.

Examples

Example 1: Remove a virtual environment by name

PS C:\> Remove-CMAppVVirtualEnvironment -Name "Test"

This command removes an App-V virtual environment named Test.

Example 2: Remove a virtual environment by ID

PS C:\> Remove-CMAppVVirtualEnvironment -Id "16781806"

This command removes an App-V virtual environment that has the ID 16781806.

Example 3: Remove a virtual environment by name by using a wildcard

PS C:\> $AppV = Get-CMAppVVirtualEnvironment -Name "T*"
PS C:\> Remove-CMAppVVirtualEnvironment -InputObject $AppV

The first command gets all App-V virtual environments that have names that begin with the letter T and stores them in the $AppV variable.

The second command removes all the environments stored in $AppV.

Required Parameters

-Id

Specifies an array of IDs of virtual environments.

Type:Int32[]
Aliases:CIId, CI_ID
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an App-V virtual environment object.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies an array of names of App-V virtual environment objects. You can use a wildcard.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False