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
 

Get-AzureBatchTaskFile

Get-AzureBatchTaskFile

microsoft.azure.commands.batch.dll

Synopsis

Gets the properties of the files associated with the specified Azure Batch task.

Syntax

Get-AzureBatchTaskFile [-WorkItemName] [-JobName] [-TaskName] [-BatchContext] [-Filter] [-MaxCount] [-Recursive] [<CommonParameters>]

Get-AzureBatchTaskFile [-WorkItemName] [-JobName] [-TaskName] [-Name] [-BatchContext] [<CommonParameters>]

Get-AzureBatchTaskFile [-Task] [-BatchContext] [-Filter] [-MaxCount] [-Recursive] [<CommonParameters>]

Detailed Description

Gets the properties of the files associated with the Azure Batch task specified by either the WorkItemName, JobName, and TaskName parameters or the Task parameter. You can use the Name parameter to get a single task file, or you can use the Filter parameter to get the task files that match an OData filter. You can use the Recursive parameter to perform a recursive list of all files of the task.

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

-Filter <string>

The OData filter clause to use when querying for task files. If no filter is specified, then all task files associated with the task specified with either the WorkItemName, JobName, and TaskName parameters or the Task parameter will be returned.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-JobName <string>

The name of the job containing the specified target task.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-MaxCount <int>

The maximum number of task files to return. If a value of 0 or less is specified, then no upper limit will be used. If no value is specified, a default value of 1000 will be used.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Name <string>

The name of the task file to retrieve. Wildcards are not permitted.

Aliases

None

Required?

false

Position

4

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Recursive <SwitchParameter>

If present, performs a recursive list of files of the task. Otherwise, returns only the files at the task directory root.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Task <PSCloudTask>

The PSCloudTask object representing the task that the task files are associated with. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-TaskName <string>

The name of the task.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-WorkItemName <string>

The name of the workitem which contains the specified target task.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

PSTaskFile

Notes

Examples

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

C:\PS>

Description

-----------

Gets the properties of the "stdout.txt" task file associated with the task named "myTask" under job "job-0000000001" under workitem "myWorkItem".

        Get-AzureBatchTaskFile -WorkItemName "myWorkItem" -JobName "job-0000000001" -TaskName "myTask" -Name "stdout.txt" -BatchContext $context

        IsDirectory Name     Properties                                      Url
        ----------- ----     ----------                                      ---
        False stdout.txt     Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
      

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

C:\PS>

Description

-----------

Gets the properties of the task files whose names start with "st" and are associated with task "myTask" under job "job-0000000001" under workitem "myWorkItem".

        Get-AzureBatchTaskFile -WorkItemName "myWorkItem" -JobName "job-0000000001" -TaskName "myTask" -Filter "startswith(name,'st')" -BatchContext $context

        IsDirectory Name        Properties                                      Url
        ----------- ----        ----------                                      ---
        False stderr.txt  Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
        False stdout.txt  Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
      

-------------------------- EXAMPLE 3 --------------------------

C:\PS>

Description

-----------

Gets the properties of all files associated with the task named "myTask2" under job "job-0000000001" under workitem "myWorkItem". Since the Recursive parameter is present, a recursive file search is performed, and the "wd\newFile.txt" task file is returned.

        Get-AzureBatchTask "myWorkItem" "job-0000000001" "myTask2" -BatchContext $context | Get-AzureBatchTaskFile -Recursive -BatchContext $context

        IsDirectory Name             Properties                                      Url
        ----------- ----             ----------                                      ---
        False ProcessEnv.cmd   Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
        False stderr.txt       Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
        False stdout.txt       Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...
        True wd                                                               https://cmdletexample.batch-test.windows-in...
        False wd\newFile.txt   Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.batch-test.windows-in...