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-AzureBatchJob

Remove-AzureBatchJob

microsoft.azure.commands.batch.dll

Synopsis

Deletes the specified Azure Batch job.

Syntax

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

Remove-AzureBatchJob [-WorkItemName] [-Name] [-BatchContext] [-Force] [<CommonParameters>]

Detailed Description

Deletes the specified Azure Batch job. 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 job is deleted. Use this parameter to delete the job 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 PSCloudJob object representing the job to delete. Use the Get-AzureBatchJob cmdlet to get a PSCloudJob object.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Name <string>

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

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-WorkItemName <string>

The name of the workitem containing the job 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 job named "job-0000000001" under the workitem named "myWorkItem". The user is prompted for confirmation before the delete operation takes place.

        Remove-AzureBatchJob -WorkItemName "myWorkItem" -Name "job-0000000001" -BatchContext $context
      

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

C:\PS>

Description

-----------

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

        Get-AzureBatchJob -WorkItemName "myWorkItem" -Name "job-0000000001" -BatchContext $context | Remove-AzureBatchJob -Force -BatchContext $context