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

Get-AzureBatchVM

microsoft.azure.commands.batch.dll

Synopsis

Gets Azure Batch vms under the specified pool.

Syntax

Get-AzureBatchVM [-Filter] [-PoolName] [-BatchContext] [-MaxCount] [<CommonParameters>]

Get-AzureBatchVM [-PoolName] [-Name] [-BatchContext] [<CommonParameters>]

Get-AzureBatchVM [-Filter] [-Pool] [-BatchContext] [-MaxCount] [<CommonParameters>]

Detailed Description

Gets the Azure Batch vms under the pool specified by either the PoolName or Pool parameters. You can use the Name parameter to get a single vm, or you can use the Filter parameter to get the vms that match an OData filter.

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 vms. If no filter is specified, then all vms under the pool specified with either the PoolName or the Pool 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 vms 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 vm to retrieve from the pool. Wildcards are not permitted.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Pool <PSCloudPool>

The PSCloudPool object representing the pool which contains the vms. Use the Get-AzureBatchPool cmdlet to get a PSCloudPool object.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-PoolName <string>

The name of the pool which contains the vms.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

PSVM

Notes

Examples

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

C:\PS>

Description

-----------

Gets the vm named "tvm-1900272697_1-20150330t205553z" from pool "myPool".

          Get-AzureBatchVM -PoolName "myPool" -Name "tvm-1900272697_1-20150330t205553z" -BatchContext $context

          Name                  : tvm-1900272697_1-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_1-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 8:59:59 PM
          LastBootTime          : 3/30/2015 8:59:59 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.128.7
          AffinityId            : TVM:tvm-1900272697_1-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :
        

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

C:\PS>

Description

-----------

Gets the idle vms under pool "myPool".

          Get-AzureBatchVM -PoolName "myPool" -Filter "state eq 'idle'" -BatchContext $context

          Name                  : tvm-1900272697_1-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_1-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 8:59:59 PM
          LastBootTime          : 3/30/2015 8:59:59 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.128.7
          AffinityId            : TVM:tvm-1900272697_1-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :

          Name                  : tvm-1900272697_2-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_2-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 9:00:26 PM
          LastBootTime          : 3/30/2015 9:00:26 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.128.17
          AffinityId            : TVM:tvm-1900272697_2-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :
        

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

C:\PS>

Description

-----------

Gets all vms under pool "myPool".

          Get-AzureBatchPool -Name "myPool" -BatchContext $context | Get-AzureBatchVM -BatchContext $context

          Name                  : tvm-1900272697_1-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_1-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 8:59:59 PM
          LastBootTime          : 3/30/2015 8:59:59 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.128.7
          AffinityId            : TVM:tvm-1900272697_1-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :

          Name                  : tvm-1900272697_2-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_2-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 9:00:26 PM
          LastBootTime          : 3/30/2015 9:00:26 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.128.17
          AffinityId            : TVM:tvm-1900272697_2-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :

          Name                  : tvm-1900272697_3-20150330t205553z
          Url                   : https://cmdletexample.batch-test.windows-int.net/pools/myPool/tvms/tvm-1900272697_3-20150330t205553z
          State                 : Idle
          StateTransitionTime   : 3/30/2015 8:59:50 PM
          LastBootTime          : 3/30/2015 8:59:50 PM
          VMAllocationTime      : 3/30/2015 8:55:53 PM
          IPAddress             : 10.215.112.35
          AffinityId            : TVM:tvm-1900272697_3-20150330t205553z
          VMSize                : small
          TotalTasksRun         : 0
          StartTaskInformation  : Microsoft.Azure.Commands.Batch.Models.PSStartTaskInformation
          RecentTasks           :
          StartTask             : Microsoft.Azure.Commands.Batch.Models.PSStartTask
          CertificateReferences :
          VMErrors              :