Remove-AzureBatchPool

Remove-AzureBatchPool

Deletes the specified Batch pool.

Syntax

Parameter Set: Default
Remove-AzureBatchPool [-Id] <String> -BatchContext <BatchAccountContext> [-Force] [ <CommonParameters>]




Detailed Description

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

Parameters

-BatchContext<BatchAccountContext>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<String>

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


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Delete a Batch pool by pool ID

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


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

Example 2: Delete all Batch pools by force

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


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

Related topics

Get-AzureBatchPool

New-AzureBatchPool

Get-AzureRmBatchAccountKeys

RMAzure_Batch_Cmdlets

Show: