New-AzureBatchPool

New-AzureBatchPool

Creates a new pool in the Batch service under the specified account.

Syntax

Parameter Set: AutoScale
New-AzureBatchPool [-Id] <String> -BatchContext <BatchAccountContext> -OSFamily <String> -VirtualMachineSize <String> [-AutoScaleFormula <String> ] [-CertificateReferences <PSCertificateReference[]> ] [-DisplayName <String> ] [-InterComputeNodeCommunicationEnabled] [-MaxTasksPerComputeNode <Int32> ] [-Metadata <IDictionary> ] [-StartTask <PSStartTask> ] [-TargetOSVersion <String> ] [-TaskSchedulingPolicy <PSTaskSchedulingPolicy> ] [ <CommonParameters>]

Parameter Set: TargetDedicated
New-AzureBatchPool [-Id] <String> -BatchContext <BatchAccountContext> -OSFamily <String> -VirtualMachineSize <String> [-CertificateReferences <PSCertificateReference[]> ] [-DisplayName <String> ] [-InterComputeNodeCommunicationEnabled] [-MaxTasksPerComputeNode <Int32> ] [-Metadata <IDictionary> ] [-ResizeTimeout <TimeSpan> ] [-StartTask <PSStartTask> ] [-TargetDedicated <Int32> ] [-TargetOSVersion <String> ] [-TaskSchedulingPolicy <PSTaskSchedulingPolicy> ] [ <CommonParameters>]

Detailed Description

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

Parameters

-AutoScaleFormula<String>

Specifies the formula for automatically scaling the pool. For more information on Autoscale formulas, see Define the Autoscaling Formula for a Pool (https://msdn.microsoft.com/en-us/library/azure/dn820182.aspx) in the Microsoft Developer Network Library.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BatchContext<BatchAccountContext>

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-CertificateReferences<PSCertificateReference[]>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DisplayName<String>

Specifies the display name of the pool.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<String>

Specifies the ID of the pool to create.

Aliases

none

Required?

true

Position?

1

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxTasksPerComputeNode<Int32>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Metadata<IDictionary>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OSFamily<String>

Specifies the operating system family of the compute nodes in the pool. For more information about operating system families and versions, see Azure Guest OS Releases and SDK Compatibility Matrix (http://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/) in the Microsoft Developer Library.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResizeTimeout<TimeSpan>

Specifies the timeout for allocating compute nodes to the pool.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StartTask<PSStartTask>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetDedicated<Int32>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetOSVersion<String>

Specifies the target operating system version of the compute nodes in the pool. You can use "*" for the latest operating system version for the specified family. For more information about operating system families and versions, see Azure Guest OS Releases and SDK Compatibility Matrix (http://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/) in the Microsoft Developer Network Library.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TaskSchedulingPolicy<PSTaskSchedulingPolicy>

Specifies the task scheduling policy, such as the ComputeNodeFillType.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualMachineSize<String>

Specifies the size of the virtual machines in the pool. For more information on virtual machine sizes, see Sizes for Virtual Machines (https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-size-specs/) in the Microsoft Developer Network Library.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

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

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

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

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

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

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

Get-AzureRmBatchAccountKeys

Get-AzureBatchPool

Remove-AzureBatchPool

RMAzure_Batch_Cmdlets