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

Get-AzureBatchVMFileContent

microsoft.azure.commands.batch.dll

Synopsis

Downloads the specified vm file.

Syntax

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

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

Get-AzureBatchVMFileContent [-PoolName] [-InputObject] [-VMName] [-Name] [-BatchContext] [-DestinationPath] [<CommonParameters>]

Get-AzureBatchVMFileContent [-InputObject] [-VMName] [-BatchContext] [-DestinationStream] [-Name] [-PoolName] [<CommonParameters>]

Detailed Description

Downloads the specified vm 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 vm 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?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <PSVMFile>

The PSVMFile object representing the file to download. Use the Get-AzureBatchVMFile cmdlet to get a PSVMFile object.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Name <string>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PoolName <string>

The name of the pool containing the vm.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VMName <string>

The name of the vm.

Aliases

None

Required?

false

Position

2

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 "startup\stdout.txt" file to the "E:\PowerShell\stdout.txt" file path. The file is from the vm named "tvm-1900272697_1-20150330t205553z" in the pool named "myPool".

          Get-AzureBatchVMFileContent -PoolName "myPool" -VMName "tvm-1900272697_1-20150330t205553z" -Name "startup\stdout.txt" -DestinationPath "E:\PowerShell\stdout.txt" -BatchContext $context
        

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

C:\PS>

Description

-----------

Downloads the "startup\stdout.txt" file to the "E:\PowerShell\stdout.txt" file path. The file is from the vm named "tvm-1900272697_1-20150330t205553z" in the pool named "myPool".

          Get-AzureBatchVMFile -PoolName "myPool" -VMName "tvm-1900272697_1-20150330t205553z" -Name "startup\stdout.txt" -BatchContext $context | Get-AzureBatchVMFileContent -DestinationPath "E:\PowerShell\stdout.txt" -BatchContext $context
        

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

C:\PS>

Description

-----------

Downloads vm file "startup\stdout.txt" from the vm named "tvm-1900272697_1-20150330t205553z" in the pool named "myPool". The file contents are copied to the user supplied Stream.

          $stream = New-Object System.IO.MemoryStream; Get-AzureBatchVMFileContent "myPool" "tvm-1900272697_1-20150330t205553z" "startup\stdout.txt" -DestinationStream $stream -BatchContext $context