Get-AzBatchPoolNodeCount
Hiermee haalt u het aantal Batch-knooppunten op per knooppuntstatus gegroepeerd op pool-id.
Get-AzBatchPoolNodeCount
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchPoolNodeCount
[-PoolId <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchPoolNodeCount
[-Pool <PSCloudPool>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchPoolNodeCount
[-MaxCount <Int32>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Met de cmdlet Get-AzBatchPoolNodeCount kunnen klanten het aantal knooppunten per knooppuntstatus per groep terughalen. Mogelijke knooppuntstatussen maken, inactief, verlatenPool, offline, geprempteerd, opnieuw opstarten, opnieuw opstarten, uitvoeren, starten, startTaskFailed, onbekend, onbruikbaar en wachtend opForStartTask. De cmdlet gebruikt pool-id of poolparameter om alleen de pool te filteren met de opgegeven pool-id.
$batchContext = Get-AzBatchAccountKey -AccountName "contosobatch"
Get-AzBatchPoolNodeCount -BatchContext $batchContext
PoolId Dedicated LowPriority
------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0
contosopool2 Idle: 1, Rebooting: 1, Total: 2 Total: 0
Aantal knooppunten per knooppunt weergeven voor pools in de context van het huidige batchaccount.
Get-AzBatchPoolNodeCount -BatchContext $batchContext -PoolId "contosopool1"
PoolId Dedicated LowPriority
------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0
$poolnodecounts = Get-AzBatchPoolNodeCount -BatchContext $batchContext -PoolId "contosopool1"
$poolnodecounts.Dedicated
Creating : 1
Idle : 1
LeavingPool : 0
Offline : 0
Preempted : 0
Rebooting : 1
Reimaging : 0
Running : 5
Starting : 0
StartTaskFailed : 0
Total : 8
Unknown : 0
Unusable : 0
WaitingForStartTask : 0
Get-AzBatchPool -Id "contosopool1" -BatchContext $batchContext | Get-AzBatchPoolNodeCount -BatchContext $batchContext
PoolId Dedicated LowPriority
------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0
Aantal knooppunten per knooppuntstatus weergeven voor een pool-id.
Het BatchAccountContext-exemplaar dat moet worden gebruikt bij interactie met de Batch-service. Als u de cmdlet Get-AzBatchAccount gebruikt om uw BatchAccountContext op te halen, wordt Microsoft Entra-verificatie gebruikt bij interactie met de Batch-service. Als u in plaats daarvan verificatie met gedeelde sleutels wilt gebruiken, gebruikt u de cmdlet Get-AzBatchAccountKey om een BatchAccountContext-object op te halen waarin de bijbehorende toegangssleutels zijn ingevuld. Wanneer u verificatie met gedeelde sleutels gebruikt, wordt de primaire toegangssleutel standaard gebruikt. Als u de sleutel wilt wijzigen die u wilt gebruiken, stelt u de eigenschap BatchAccountContext.KeyInUse in.
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
De referenties, het account, de tenant en het abonnement die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Hiermee geeft u het maximum aantal groepen dat moet worden geretourneerd. De standaardwaarde is 10.
Type: | Int32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Hiermee geeft u de PSCloudPool- waarvoor het aantal knooppunten moet worden opgehaald.
Type: | PSCloudPool |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
De id van de pool waarvoor het aantal knooppunten moet worden opgehaald.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
Azure PowerShell-feedback
Azure PowerShell is een open source project. Selecteer een koppeling om feedback te geven: