Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-AzureBatchTask

Remove-AzureBatchTask

microsoft.azure.commands.batch.dll

Synopsis

Deletes the specified Azure Batch task.

Syntax

Remove-AzureBatchTask [-InputObject] [-BatchContext] [-Force] [<CommonParameters>]

Remove-AzureBatchTask [-WorkItemName] [-JobName] [-Name] [-BatchContext] [-Force] [<CommonParameters>]

Detailed Description

Deletes the specified Azure Batch task. You will be prompted for confirmation unless you use the Force parameter.

Parameters

-BatchContext <BatchAccountContext>

The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Force <SwitchParameter>

If this parameter is not present, then you will be prompted for confirmation before the task is deleted. Use this parameter to delete the task without being asked for confirmation.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <PSCloudJob>

The PSCloudTask object representing the task to delete. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-JobName <string>

The name of the job containing the task to delete.

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Name <string>

The name of the task to delete. Wildcards are not permitted.

Aliases

None

Required?

true

Position

3

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-WorkItemName <string>

The name of the workitem containing the task to delete.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

Deletes the task named "myTask" under job "job-0000000001" under workitem "myWorkItem". The user is prompted for confirmation before the delete operation takes place.

        Remove-AzureBatchTask -WorkItemName "myWorkItem" -JobName "job-0000000001" -Name "myTask" -BatchContext $context
      

-------------------------- EXAMPLE 2 --------------------------

C:\PS>

Description

-----------

Deletes the task named "myTask2" under job "job-0000000001" under workitem "myWorkItem". Since the Force parameter is present, the confirmation prompt is suppressed.

        Get-AzureBatchTask "myWorkItem" "job-0000000001" "myTask2" -BatchContext $context | Remove-AzureBatchTask -Force -BatchContext $context