Remove-​Azure​Batch​Pool

Deletes the specified Batch pool.

Syntax

Remove-AzureBatchPool
      [-Id] <String>
      -BatchContext <BatchAccountContext>
      [-Force]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-AzureBatchPool cmdlet deletes the specified Azure Batch pool. You are prompted for confirmation unless you use the Force parameter.

Examples

Example 1: Delete a Batch pool by pool ID

PS C:\>Remove-AzureBatchPool -Id "MyPool" -BatchContext $Context

This command deletes the pool with ID MyPool. The user is prompted for confirmation before the delete operation takes place.

Example 2: Delete all Batch pools by force

PS C:\>Get-AzureBatchPool -BatchContext $Context | Remove-AzureBatchPool -Force -BatchContext $Context

This command deletes all Batch pools. Because the Force parameter is present, the confirmation prompt is suppressed.

Required Parameters

-BatchContext

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRmBatchAccountKeys cmdlet.

Type:BatchAccountContext
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Id

Specifies the ID of the pool to delete. You cannot specify wildcard characters.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Forces the command to run without asking for user confirmation.

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