New-AzBatchPool
Skapar en pool i Batch-tjänsten.
Syntax
New-AzBatchPool
[-Id] <String>
-VirtualMachineSize <String>
[-DisplayName <String>]
[-ResizeTimeout <TimeSpan>]
[-TargetDedicatedComputeNodes <Int32>]
[-TargetLowPriorityComputeNodes <Int32>]
[-TaskSlotsPerNode <Int32>]
[-UpgradePolicy <PSUpgradePolicy>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
[-ResourceTag <IDictionary>]
[-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled]
[-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-CloudServiceConfiguration <PSCloudServiceConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>]
[-MountConfiguration <PSMountConfiguration[]>]
[-UserAccount <PSUserAccount[]>]
[-CurrentNodeCommunicationMode <NodeCommunicationMode>]
[-TargetNodeCommunicationMode <NodeCommunicationMode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBatchPool
[-Id] <String>
-VirtualMachineSize <String>
[-DisplayName <String>]
[-ResizeTimeout <TimeSpan>]
[-TargetDedicatedComputeNodes <Int32>]
[-TargetLowPriorityComputeNodes <Int32>]
[-TaskSlotsPerNode <Int32>]
[-UpgradePolicy <PSUpgradePolicy>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
[-ResourceTag <IDictionary>]
[-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled]
[-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>]
[-MountConfiguration <PSMountConfiguration[]>]
[-UserAccount <PSUserAccount[]>]
[-CurrentNodeCommunicationMode <NodeCommunicationMode>]
[-TargetNodeCommunicationMode <NodeCommunicationMode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBatchPool
[-Id] <String>
-VirtualMachineSize <String>
[-DisplayName <String>]
[-AutoScaleEvaluationInterval <TimeSpan>]
[-AutoScaleFormula <String>]
[-TaskSlotsPerNode <Int32>]
[-UpgradePolicy <PSUpgradePolicy>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
[-ResourceTag <IDictionary>]
[-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled]
[-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-CloudServiceConfiguration <PSCloudServiceConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>]
[-MountConfiguration <PSMountConfiguration[]>]
[-UserAccount <PSUserAccount[]>]
[-CurrentNodeCommunicationMode <NodeCommunicationMode>]
[-TargetNodeCommunicationMode <NodeCommunicationMode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBatchPool
[-Id] <String>
-VirtualMachineSize <String>
[-DisplayName <String>]
[-AutoScaleEvaluationInterval <TimeSpan>]
[-AutoScaleFormula <String>]
[-TaskSlotsPerNode <Int32>]
[-UpgradePolicy <PSUpgradePolicy>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>]
[-ResourceTag <IDictionary>]
[-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled]
[-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>]
[-MountConfiguration <PSMountConfiguration[]>]
[-UserAccount <PSUserAccount[]>]
[-CurrentNodeCommunicationMode <NodeCommunicationMode>]
[-TargetNodeCommunicationMode <NodeCommunicationMode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Cmdleten New-AzBatchPool skapar en pool i Azure Batch-tjänsten under det konto som anges av parametern BatchContext.
Exempel
Exempel 1: Skapa en ny pool med parameteruppsättningen TargetDedicated med CloudServiceConfiguration
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration" -ArgumentList @(4,"*")
New-AzBatchPool -Id "MyPool" -VirtualMachineSize "STANDARD_D1_V2" -CloudServiceConfiguration $configuration -TargetDedicatedComputeNodes 3 -BatchContext $Context
Poolen är konfigurerad för att använda STANDARD_D1_V2 virtuella datorer med operativsystemets version av familj fyra.
Exempel 2: Skapa en ny pool med parameteruppsättningen TargetDedicated med hjälp av VirtualMachineConfiguration
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
New-AzBatchPool -Id "MyPool" -VirtualMachineSize "STANDARD_D1_V2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -BatchContext $Context
Det här kommandot skapar en ny pool med ID MyPool med parameteruppsättningen TargetDedicated. Målallokeringen är tre beräkningsnoder. Poolen är konfigurerad för att använda STANDARD_D1_V2 virtuella datorer med operativsystemavbildningen Windows-2016-Datacenter.
Exempel 3: Skapa en ny pool med parameteruppsättningen Autoskala
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "STANDARD_D1_V2" -VirtualMachineConfiguration $configuration -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context
Det här kommandot skapar en ny pool med ID AutoScalePool med hjälp av parameteruppsättningen Autoskala. Poolen är konfigurerad för att använda STANDARD_D1_V2 virtuella datorer med operativsystemavbildningen Windows-2016-Datacenter, och målantalet beräkningsnoder bestäms av formeln Autoskalning.
Exempel 4: Skapa en pool med noder i ett undernät
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
$networkConfig = New-Object Microsoft.Azure.Commands.Batch.Models.PSNetworkConfiguration
$networkConfig.SubnetId = "/subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}"
New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "STANDARD_D1_V2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -NetworkConfiguration $networkConfig -BatchContext $Context
Exempel 5: Skapa en pool med anpassade användarkonton
$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
$userAccount = New-Object Microsoft.Azure.Commands.Batch.Models.PSUserAccount -ArgumentList @("myaccount", "mypassword")
New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "STANDARD_D1_V2" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -UserAccount $userAccount
Parametrar
-ApplicationLicenses
Listan över programlicenser som Batch-tjänsten gör tillgängliga på varje beräkningsnod i poolen.
Typ: | List<T>[String] |
Alias: | ApplicationLicense |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ApplicationPackageReferences
Typ: | PSApplicationPackageReference[] |
Alias: | ApplicationPackageReference |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AutoScaleEvaluationInterval
Anger hur lång tid i minuter som förflutit innan poolstorleken justeras automatiskt enligt autoskalningsformeln. Standardvärdet är 15 minuter och det minsta värdet är 5 minuter.
Typ: | Nullable<T>[TimeSpan] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AutoScaleFormula
Anger formeln för automatisk skalning av poolen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-BatchContext
Anger BatchAccountContext instans som den här cmdleten använder för att interagera med Batch-tjänsten. Om du använder cmdleten Get-AzBatchAccount för att hämta BatchAccountContext används Microsoft Entra-autentisering när du interagerar med Batch-tjänsten. Om du vill använda autentisering med delad nyckel i stället använder du cmdleten Get-AzBatchAccountKey för att hämta ett BatchAccountContext-objekt med dess åtkomstnycklar ifyllda. När du använder autentisering med delad nyckel används den primära åtkomstnyckeln som standard. Om du vill ändra vilken nyckel som ska användas anger du egenskapen BatchAccountContext.KeyInUse.
Typ: | BatchAccountContext |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-CertificateReferences
Anger certifikat som är associerade med poolen. Batch-tjänsten installerar de refererade certifikaten på varje beräkningsnod i poolen.
Typ: | PSCertificateReference[] |
Alias: | CertificateReference |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-CloudServiceConfiguration
Anger konfigurationsinställningar för en pool baserat på Azure-molntjänstplattformen.
Typ: | PSCloudServiceConfiguration |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-CurrentNodeCommunicationMode
Det aktuella poolkommunikationsläget.
Typ: | NodeCommunicationMode |
Godkända värden: | Default, Classic, Simplified |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DisplayName
Anger visningsnamnet för poolen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Id
Anger ID för poolen som ska skapas.
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-InterComputeNodeCommunicationEnabled
Anger att den här cmdleten konfigurerar poolen för direkt kommunikation mellan dedikerade beräkningsnoder.
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Metadata
Anger metadata, som nyckel/värde-par, som ska läggas till i den nya poolen. Nyckeln är metadatanamnet. Värdet är metadatavärdet.
Typ: | IDictionary |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-MountConfiguration
En lista över filsystem som ska monteras på varje nod i poolen. Detta stöder Azure Files, NFS, CIFS/SMB och Blobfuse.
Typ: | PSMountConfiguration[] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-NetworkConfiguration
Nätverkskonfigurationen för poolen.
Typ: | PSNetworkConfiguration |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResizeTimeout
Anger tidsgränsen för allokering av beräkningsnoder till poolen.
Typ: | Nullable<T>[TimeSpan] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceTag
De användardefinierade taggarna som ska associeras med Azure Batch-poolen.När de anges sprids dessa taggar till de Azure-resurser som är associerade med poolen. Den här egenskapen kan bara anges när Batch-kontot skapades med egenskapen poolAllocationMode inställd på "UserSubscription".
Typ: | IDictionary |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-StartTask
Anger startuppgiftsspecifikationen för poolen. Startaktiviteten körs när en beräkningsnod ansluter till poolen, eller när beräkningsnoden startas om eller omskapas.
Typ: | PSStartTask |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TargetDedicatedComputeNodes
Anger målantalet dedikerade beräkningsnoder som ska allokeras till poolen.
Typ: | Nullable<T>[Int32] |
Alias: | TargetDedicated |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TargetLowPriorityComputeNodes
Anger målantalet beräkningsnoder med låg prioritet som ska allokeras till poolen.
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TargetNodeCommunicationMode
Önskat nodkommunikationsläge för poolen.
Typ: | NodeCommunicationMode |
Godkända värden: | Default, Classic, Simplified |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TaskSchedulingPolicy
Anger uppgiftsschemaläggningsprincipen, till exempel ComputeNodeFillType.
Typ: | PSTaskSchedulingPolicy |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TaskSlotsPerNode
Antalet aktivitetsfack som kan användas för att köra samtidiga uppgifter på en enda beräkningsnod i poolen. Standardvärdet är 1. Det maximala värdet är mindre än 4 gånger antalet kärnor i vmSize för poolen eller 256.
Typ: | Nullable<T>[Int32] |
Alias: | MaxTasksPerComputeNode |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-UpgradePolicy
Uppgraderingsprincipen för poolen i NewBatchPoolCommand.cs .
Typ: | PSUpgradePolicy |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-UserAccount
Listan över användarkonton som ska skapas på varje nod i poolen.
Typ: | PSUserAccount[] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualMachineConfiguration
Anger konfigurationsinställningar för en pool i infrastrukturen för virtuella datorer.
Typ: | PSVirtualMachineConfiguration |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualMachineSize
Anger storleken på de virtuella datorerna i poolen. Mer information om storlekar för virtuella datorer finns i Storlekar för virtuella datorer på Microsoft Azure-webbplatsen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
Utdata
Relaterade länkar
Azure PowerShell