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

Get-AzureBatchTaskFileContent

microsoft.azure.commands.batch.dll

Synopsis

Downloads the specified task file.

Syntax

Get-AzureBatchTaskFileContent [-InputObject] [-InputObject] [-BatchContext] [-DestinationPath] [<CommonParameters>]

Get-AzureBatchTaskFileContent [-InputObject] [-InputObject] [-BatchContext] [-DestinationStream] [<CommonParameters>]

Get-AzureBatchTaskFileContent [-WorkItemName] [-InputObject] [-JobName] [-TaskName] [-Name] [-BatchContext] [-DestinationPath] [<CommonParameters>]

Get-AzureBatchTaskFileContent [-WorkItemName] [-InputObject] [-BatchContext] [-DestinationStream] [-JobName] [-Name] [-TaskName] [<CommonParameters>]

Detailed Description

Downloads the specified task file to the specified file location or to the user supplied stream.

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

-DestinationPath <string>

The file path where the task file will be downloaded.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DestinationStream <Stream>

The Stream into which the vm file contents will be written. This stream will not be closed or rewound by this call.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <PSTaskFile>

The PSTaskFile object representing the file to download. Use the Get-AzureBatchTaskFile cmdlet to get a PSTaskFile object.

Aliases

None

Required?

false

Position

1

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

-Name <string>

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

Aliases

None

Required?

true

Position

4

Default value

None

Accept pipeline input?

false

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


Notes

Examples

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

C:\PS>

Description

-----------

Downloads the task file named "stdout.txt" to the "E:\PowerShell\stdout.txt" file path. The "stdout.txt" task file is associated with task "myTask" under job "job-0000000001" under workitem "myWorkItem".

          Get-AzureBatchTaskFileContent -WorkItemName "myWorkItem" -JobName "job-0000000001" -TaskName "myTask" -Name "stdout.txt" -DestinationPath "E:\PowerShell\stdout.txt" -BatchContext $context
        

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

C:\PS>

Description

-----------

Downloads the task file named "stderr.txt" to the "E:\PowerShell\stdout.txt" file path. The "stdout.txt" task file is associated with task "myTask" under job "job-0000000001" under workitem "myWorkItem".

          Get-AzureBatchTaskFile "myWorkItem" "job-0000000001" "myTask" "stderr.txt" -BatchContext $context | Get-AzureBatchTaskFileContent -DestinationPath "E:\PowerShell\stdout.txt" -BatchContext $context
        

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

C:\PS>

Description

-----------

Downloads the task file named "stdout.txt" from task "myTask" under job "job-0000000001" under workitem "myWorkItem". The file contents are copied to the user supplied Stream.

          $stream = New-Object System.IO.MemoryStream; Get-AzureBatchTaskFileContent "myWorkItem" "job-0000000001" "myTask" "stdout.txt" -DestinationStream $stream -BatchContext $context