< Back

Remove-AzureBatchNodeFile

Tue Jan 29, 2019 9:36 pm

NAME Remove-AzureBatchNodeFile



SYNOPSIS

Deletes a node file for a task or compute node.





SYNTAX

Remove-AzureBatchNodeFile [-PoolId] <String> [-ComputeNodeId] <String> -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] [-Force] -Path <String> [-Recursive] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureBatchNodeFile [[-InputObject] <PSNodeFile>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-Force]

[-Recursive] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureBatchNodeFile -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-Force] -JobId <String> -Path <String>

[-Recursive] -TaskId <String> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Remove-AzureBatchNodeFile cmdlet deletes an Azure Batch node file for a task or compute node.





PARAMETERS

-BatchContext <BatchAccountContext>

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount

cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To

use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys

populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the

BatchAccountContext.KeyInUse property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ComputeNodeId <String>

Specifies the ID of the compute node that contains the Batch node file that this cmdlet deletes.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <PSNodeFile>

Specifies PSNodeFile object that represent the node file that this cmdlet deletes. To obtain a PSNodeFile , use the Get-AzureBatchNodeFile

cmdlet.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-JobId <String>

Specifies the ID of the job that contains the task.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

The file path of the node file to delete.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PoolId <String>

Specifies the ID of the pool that contains the compute nodes for which this cmdlet removes a file.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Recursive [<SwitchParameter>]

Indicates that this cmdlet deletes the folder and all subfolders and files under the specified path. This cmdlet is relevant only if the path

is a folder.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-TaskId <String>

Specifies the ID of the task.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

BatchAccountContext

Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline



PSNodeFile

Parameter 'InputObject' accepts value of type 'PSNodeFile' from the pipeline





OUTPUTS



NOTES









Example 1: Delete a file assocated with a task



PS C:\\>Remove-AzureBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "wd\\testFile.txt" -BatchContext $Context



This command deletes the node file that is named wd\\testFile.txt. That file is associated with the task that has the ID Task26 under the job

Job-000001.





Example 2: Delete a file from a compute node



PS C:\\>Remove-AzureBatchNodeFile -PoolId "Pool07" -ComputeNodeId "tvm-2316545714_1-20150725t213220z" -Path "startup\\testFile.txt" -BatchContext

$Context



This command deletes the node file that is named startup\\testFile.txt from the specified compute node in the pool that has the ID Pool07.





Example 3: Remove a file by using the pipeline



PS C:\\>Get-AzureBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "wd\\testFile2.txt" -BatchContext $Context | Remove-AzureBatchNodeFile

-Force -BatchContext $Context



This command gets the node file by using Get-AzureBatchNodeFile . That file is associated with the task that has the ID Task26 under the job

Job-000001. The command passes that file to the current cmdlet by using the pipeline. The current cmdlet removes the node file. The command

specifies the Force parameter. Therefore, the command does not prompt you for confirmation.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... chnodefile

Get-AzureRmBatchAccountKeys

Get-AzureBatchNodeFile

Get-AzureBatchNodeFileContent