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

Get-AzureBatchVMFile

microsoft.azure.commands.batch.dll

Synopsis

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

Syntax

Get-AzureBatchVMFile [-Filter] [-PoolName] [-VMName] [-BatchContext] [-MaxCount] [-Recursive] [<CommonParameters>]

Get-AzureBatchVMFile [-PoolName] [-Name] [-BatchContext] [-Recursive] [-VMName] [<CommonParameters>]

Get-AzureBatchVMFile [-Filter] [-VM] [-BatchContext] [-MaxCount] [-Recursive] [<CommonParameters>]

Detailed Description

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

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 vm files. If no filter is specified, then all vm files on the vm specified with either the PoolName and VMName parameters or the VM parameter will be returned.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-MaxCount <int>

The maximum number of vm 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 file to retrieve from the vm. Wildcards are not permitted.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PoolName <string>

The name of the pool which contains the vm.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Recursive <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VM <PSVM>

The PSVM object representing the vm which contains the files. Use the Get-AzureBatchVM cmdlet to get a PSVM object.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-VMName <string>

The name of the vm containing the files.

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

PSVMFile

Notes

Examples

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

C:\PS>

Description

-----------

Gets the file named "startup\stdout.txt" from the vm named "tvm-1900272697_3-20150330t205553z" in the pool "myPool".

          Get-AzureBatchVMFile -PoolName "myPool" -VMName "tvm-1900272697_3-20150330t205553z" -Name "startup\stdout.txt" -BatchContext $context

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

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

C:\PS>

Description

-----------

Gets the files under the "startup" directory from the vm named "tvm-1900272697_3-20150330t205553z" in pool "myPool".

          Get-AzureBatchVMFile -PoolName "myPool" -VMName "tvm-1900272697_3-20150330t205553z" -Filter "startswith(name,'startup')" -Recursive -BatchContext $context

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

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

C:\PS>

Description

-----------

Gets all the files at the root directory of the vm named "tvm-1900272697_3-20150330t205553z" in pool "myPool".

          Get-AzureBatchVM "myPool" "tvm-1900272697_3-20150330t205553z" -BatchContext $context | Get-AzureBatchVMFile -BatchContext $context

          IsDirectory Name           Properties       Url
          ----------- ----           ----------       ---
          True shared                          https://cmdletexample.batch-test.windows-in...
          True startup                         https://cmdletexample.batch-test.windows-in...
          True workitems                       https://cmdletexample.batch-test.windows-in...