Microsoft

Microsoft Docs

Remove-AzContainerGroup

Deletes an Azure Container Instance (ACI) container group.

Synopsis

Remove-AzContainerGroup
   -ResourceGroupName <String>
   -Name <String>
   [-Force]
   [-AsJob]
   []

Parameters

ParameterTypeRequiredDescription
-ResourceGroupNameStringYesName of the resource group that contains the container group.
-NameStringYesName of the container group to remove.
-ForceSwitchParameterNoSuppresses confirmation prompts.
-AsJobSwitchParameterNoRuns the command as a background job.
-WhatIfSwitchParameterNoShows what would happen if the command runs.
-ConfirmSwitchParameterNoPrompts for confirmation before executing.

Examples

Example 1: Remove a container group

Deletes the container group myContainerGroup in the resource group myResourceGroup after confirming the action.

Remove-AzContainerGroup -ResourceGroupName "myResourceGroup" -Name "myContainerGroup"

Example 2: Remove without confirmation

Deletes the container group without prompting for confirmation.

Remove-AzContainerGroup -ResourceGroupName "myRG" -Name "myCG" -Force

Related Links