< Back

Get-AzureBatchPool

Tue Jan 29, 2019 9:35 pm

NAME Get-AzureBatchPool



SYNOPSIS

Gets Batch pools under the specified Batch account.





SYNTAX

Get-AzureBatchPool -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-Expand <String>] [-Filter <String>] [-MaxCount

<Int32>] [-Select <String>] [<CommonParameters>]



Get-AzureBatchPool [[-Id] <String>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-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.





PARAMETERS

-BatchContext <BatchAccountContext>

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount

cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To

use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys

populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the

BatchAccountContext.KeyInUse property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Expand <String>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Filter <String>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Id <String>

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



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-MaxCount <Int32>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Select <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

BatchAccountContext

Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline



String

Parameter 'Id' accepts value of type 'String' from the pipeline





OUTPUTS

PSCloudPool







NOTES









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.azur ... ols/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.azur ... ols/MyPool

VirtualMachineSize : small



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







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ebatchpool

Get-AzureRmBatchAccountKeys

New-AzureBatchPool

Remove-AzureBatchPool

Azure Batch Cmdlets