Gets pool summary statistics for a Batch account.


   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]


The Get-AzBatchPoolStatistic cmdlet gets the lifetime statistics for all of the pools in the specified account. Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics.


Example 1: Get resource statistics of all pools in an account

PS C:\>$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
PS C:\> $PoolStatistics = Get-AzBatchPoolStatistic -BatchContext $Context
PS C:\> $PoolStatistics.ResourceStatistics 
AverageCpuPercentage : 0.351232518750755
AverageDiskGiB       : 55.2569014701165
AverageMemoryGiB     : 2.87273772318252
DiskReadGiB          : 45.1326256990433
DiskReadIOps         : 878278
DiskWriteGiB         : 1230.72120628133
DiskWriteIOps        : 176832212
LastUpdateTime       : 5/16/2016 4:30:00 PM
NetworkReadGiB       : 29.3502839952707
NetworkWriteGiB      : 25.5208827350289
PeakDiskGiB          : 21.9638671875
PeakMemoryGiB        : 1.11184692382813
StartTime            : 2/10/2016 7:07:24 PM

The first command creates an object reference to the account keys for the batch account named ContosoBatchAccount by using Get-AzBatchAccountKey. The command stores this object reference in the $Context variable. The second command gets the statistics of all of the pools in the specified account, and then stores them in the $PoolStatistics. The final command displays the ResourceStatistics property of $PoolStatistics.



Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To use shared key authentication instead, use the Get-AzBatchAccountKey cmdlet to get a BatchAccountContext object with its access keys populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the BatchAccountContext.KeyInUse property.

Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

The credentials, account, tenant, and subscription used for communication with azure.

Aliases:AzContext, AzureRmContext, AzureCredential
Default value:None
Accept pipeline input:False
Accept wildcard characters:False