Get-​Azure​Batch​Pool

Gets Batch pools under the specified Batch account.

Syntax

Get-AzureBatchPool
   -BatchContext <BatchAccountContext>
   [-Expand <String>]
   [-Filter <String>]
   [-MaxCount <Int32>]
   [-Select <String>]
   [<CommonParameters>]
Get-AzureBatchPool
   [[-Id] <String>]
   -BatchContext <BatchAccountContext>
   [-Expand <String>]
   [-Select <String>]
   [<CommonParameters>]

Description

The Get-AzureBatchPool cmdlet gets the Azure Batch pools under the Batch account specified with the BatchContext parameter. You can use the Id parameter to get a single pool, or you can use the Filter parameter to get the pools that match an Open Data Protocol (OData) filter.

Examples

Example 1: Get a pool by ID

PS C:\>Get-AzureBatchPool -Id "MyPool" -BatchContext $Context
AllocationState                      : Resizing
AllocationStateTransitionTime        : 7/25/2015 9:30:28 PM
AutoScaleEnabled                     : False
AutoScaleFormula                     : 
AutoScaleRun                         : 
CertificateReferences                : 
CreationTime                         : 7/25/2015 9:30:28 PM
CurrentDedicated                     : 0
CurrentOSVersion                     : *
DisplayName                          : 
ETag                                 : 0x8D29538429CF04C
Id                                   : MyPool
InterComputeNodeCommunicationEnabled : False
LastModified                         : 7/25/2015 9:30:28 PM
MaxTasksPerComputeNode               : 1
Metadata                             : 
OSFamily                             : 4
ResizeError                          : 
ResizeTimeout                        : 00:05:00
TaskSchedulingPolicy                 : Microsoft.Azure.Commands.Batch.Models.PSTaskSchedulingPolicy
StartTask                            : 
State                                : Active
StateTransitionTime                  : 7/25/2015 9:30:28 PM
Statistics                           : 
TargetDedicated                      : 1
TargetOSVersion                      : *
Url                                  : https://cmdletexample.westus.batch.azure.com/pools/MyPool
VirtualMachineSize                   : small

This command gets the pool with ID MyPool.

Example 2: Get all pools using an OData filter

PS C:\>Get-AzureBatchPool -Filter "startswith(id,'My')" -BatchContext $Context
AllocationState                      : Resizing
AllocationStateTransitionTime        : 7/25/2015 9:30:28 PM
AutoScaleEnabled                     : False
AutoScaleFormula                     : 
AutoScaleRun                         : 
CertificateReferences                : 
CreationTime                         : 7/25/2015 9:30:28 PM
CurrentDedicated                     : 0
CurrentOSVersion                     : *
DisplayName                          : 
ETag                                 : 0x8D29538429CF04C
Id                                   : MyPool
InterComputeNodeCommunicationEnabled : False
LastModified                         : 7/25/2015 9:30:28 PM
MaxTasksPerComputeNode               : 1
Metadata                             : 
OSFamily                             : 4
ResizeError                          : 
ResizeTimeout                        : 00:05:00
TaskSchedulingPolicy                 : Microsoft.Azure.Commands.Batch.Models.PSTaskSchedulingPolicy
StartTask                            : 
State                                : Active
StateTransitionTime                  : 7/25/2015 9:30:28 PM
Statistics                           : 
TargetDedicated                      : 1
TargetOSVersion                      : *
Url                                  : https://cmdletexample.westus.batch.azure.com/pools/MyPool
VirtualMachineSize                   : small

This command gets the pools whose IDs start with My by using the Filter parameter.

Required Parameters

-BatchContext

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRmBatchAccountKeys cmdlet.

Type:BatchAccountContext
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Expand

Specifies an Open Data Protocol (OData) expand clause. Specify a value for this parameter to get associated entities of the main entity that you get.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Filter

Specifies the OData filter clause to use when querying for pools. If you do not specify a filter, all pools under the Batch account specified with the BatchContext parameter are returned.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Id

Specifies the ID of the pool to get. You cannot specify wildcard characters.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-MaxCount

Specifies the maximum number of pools to return. If you specify a value of zero (0) or less, the cmdlet does not use an upper limit. The default value is 1000.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Select

Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object properties.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

PSCloudPool