Get-AzBatchPoolNodeCount
Ruft die Anzahl der Batchknoten pro Knotenstatus nach Pool-ID gruppiert ab.
Syntax
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>]
Beschreibung
Mit dem Cmdlet "Get-AzBatchPoolNodeCount" können Kunden die Anzahl der Knoten pro Nach Pool gruppierten Knotenstatus abrufen. Mögliche Knotenzustände werden erstellt, im Leerlauf, verlassenPool, Offline, Vorabstart, Neustarten, Reimaging, Running, Starting, startTaskFailed, unbekannt, unbrauchbar und waitingForStartTask. Das Cmdlet verwendet den Parameter PoolId oder Pool, um nur den Pool mit der angegebenen Pool-ID zu filtern.
Beispiele
Beispiel 1
$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
Listenknotenanzahl pro Knotenstatus für Pools unter dem aktuellen Batchkontokontext.
Beispiel 2
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
Knotenanzahl pro Knotenstatus für einen pool angegebenen Pool-ID anzeigen.
Parameter
-BatchContext
Die BatchAccountContext-Instanz, die beim Interagieren mit dem Batchdienst verwendet werden soll. Wenn Sie das Cmdlet Get-AzBatchAccount verwenden, um Ihren BatchAccountContext abzurufen, wird die Microsoft Entra-Authentifizierung bei der Interaktion mit dem Batchdienst verwendet. Verwenden Sie zum Verwenden der gemeinsamen Schlüsselauthentifizierung stattdessen das Cmdlet "Get-AzBatchAccountKey", um ein BatchAccountContext-Objekt mit den aufgefüllten Zugriffstasten abzurufen. Bei Verwendung der Authentifizierung mit gemeinsam genutzten Schlüsseln wird standardmäßig der primäre Zugriffsschlüssel verwendet. Um den zu verwendenden Schlüssel zu ändern, legen Sie die BatchAccountContext.KeyInUse-Eigenschaft fest.
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
Die Anmeldeinformationen, Konten, Mandanten und Abonnements, die für die Kommunikation mit Azure verwendet werden.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxCount
Gibt die maximale Anzahl der zurückzugebenden Pools an. Der Standardwert ist 10.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Pool
Gibt den PSCloudPool an, für den die Knotenanzahl abgerufen werden soll.
Type: | PSCloudPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PoolId
Die ID des Pools, für den Die Knotenanzahl abgerufen werden soll.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Eingaben
Ausgaben
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für