New-​Azure​Batch​Pool

Creates a pool in the Batch service.

Syntax

New-AzureBatchPool
   [-Id] <String>
   [-ApplicationPackageReferences <PSApplicationPackageReference[]>]
   [-AutoScaleEvaluationInterval <TimeSpan>]
   [-AutoScaleFormula <String>]
   -BatchContext <BatchAccountContext>
   [-CertificateReferences <PSCertificateReference[]>]
   [-DisplayName <String>]
   [-InterComputeNodeCommunicationEnabled]
   [-MaxTasksPerComputeNode <Int32>]
   [-Metadata <IDictionary>]
   [-NetworkConfiguration <PSNetworkConfiguration>]
   [-StartTask <PSStartTask>]
   [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
   [-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
   -VirtualMachineSize <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureBatchPool
   [-Id] <String>
   [-ApplicationPackageReferences <PSApplicationPackageReference[]>]
   [-AutoScaleEvaluationInterval <TimeSpan>]
   [-AutoScaleFormula <String>]
   -BatchContext <BatchAccountContext>
   [-CertificateReferences <PSCertificateReference[]>]
   [-CloudServiceConfiguration <PSCloudServiceConfiguration>]
   [-DisplayName <String>]
   [-InterComputeNodeCommunicationEnabled]
   [-MaxTasksPerComputeNode <Int32>]
   [-Metadata <IDictionary>]
   [-NetworkConfiguration <PSNetworkConfiguration>]
   [-StartTask <PSStartTask>]
   [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
   -VirtualMachineSize <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureBatchPool
   [-Id] <String>
   [-ApplicationPackageReferences <PSApplicationPackageReference[]>]
   -BatchContext <BatchAccountContext>
   [-CertificateReferences <PSCertificateReference[]>]
   [-CloudServiceConfiguration <PSCloudServiceConfiguration>]
   [-DisplayName <String>]
   [-InterComputeNodeCommunicationEnabled]
   [-MaxTasksPerComputeNode <Int32>]
   [-Metadata <IDictionary>]
   [-NetworkConfiguration <PSNetworkConfiguration>]
   [-ResizeTimeout <TimeSpan>]
   [-StartTask <PSStartTask>]
   [-TargetDedicated <Int32>]
   [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
   -VirtualMachineSize <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureBatchPool
   [-Id] <String>
   [-ApplicationPackageReferences <PSApplicationPackageReference[]>]
   -BatchContext <BatchAccountContext>
   [-CertificateReferences <PSCertificateReference[]>]
   [-DisplayName <String>]
   [-InterComputeNodeCommunicationEnabled]
   [-MaxTasksPerComputeNode <Int32>]
   [-Metadata <IDictionary>]
   [-NetworkConfiguration <PSNetworkConfiguration>]
   [-ResizeTimeout <TimeSpan>]
   [-StartTask <PSStartTask>]
   [-TargetDedicated <Int32>]
   [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
   [-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
   -VirtualMachineSize <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureBatchPool cmdlet creates a pool in the Azure Batch service under the account specified by the BatchContext parameter.

Examples

Example 1: Create a new pool using the TargetDedicated parameter set

PS C:\>New-AzureBatchPool -Id "MyPool" -VirtualMachineSize "Small" -OSFamily "4" -TargetOSVersion "*" -TargetDedicated 3 -BatchContext $Context

This command creates a new pool with ID MyPool using the TargetDedicated parameter set. The target allocation is three compute nodes. The pool is configured to use small virtual machines imaged with the latest operating system version of family four.

Example 2: Create a new pool using the AutoScale parameter set

PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -OSFamily "4" -TargetOSVersion "*" -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context

This command creates a new pool with ID AutoScalePool using the AutoScale parameter set. The pool is configured to use small virtual machines imaged with the latest operating system version of family four, and the target number of compute nodes are determined by the Autoscale formula.

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

Specifies the ID of the pool to create.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualMachineSize

Specifies the size of the virtual machines in the pool. For more information about virtual machine sizes, see Sizes for virtual machineshttps://azure.microsoft.com/en-us/documentation/articles/virtual-machines-size-specs/ (https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-size-specs/) in the Microsoft Azure site.

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

Optional Parameters

-ApplicationPackageReferences
Type:PSApplicationPackageReference[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AutoScaleEvaluationInterval

Specifies the amount of time, in minutes, that elapses before the pool size is automatically adjusted according to the AutoScale formula. The default value is 15 minutes, and the minimum value is 5 minutes.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AutoScaleFormula

Specifies the formula for automatically scaling the pool.

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

Specifies certificates associated with the pool. The Batch service installs the referenced certificates on each compute node of the pool.

Type:PSCertificateReference[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CloudServiceConfiguration

Specifies configuration settings for a pool based on the Azure cloud service platform.

Type:PSCloudServiceConfiguration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the display name of the pool.

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

Indicates that this cmdlet sets up the pool for direct communication between dedicated compute nodes.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaxTasksPerComputeNode

Specifies the maximum number of tasks that can run on a single compute node.

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

Specifies the metadata, as key/value pairs, to add to the new pool. The key is the metadata name. The value is the metadata value.

Type:IDictionary
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NetworkConfiguration
Type:PSNetworkConfiguration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResizeTimeout

Specifies the time-out for allocating compute nodes to the pool.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartTask

Specifies the start task specification for the pool. The start task is run when a compute node joins the pool, or when the compute node is rebooted or reimaged.

Type:PSStartTask
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetDedicated

Specifies the target number of compute nodes to allocate to the pool.

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

Specifies the task scheduling policy, such as the ComputeNodeFillType.

Type:PSTaskSchedulingPolicy
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualMachineConfiguration

Specifies configuration settings for a pool on the virtual machines infrastructure.

Type:PSVirtualMachineConfiguration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False