New-AzBatchAccountKey
Regenerates a key of a Batch account.
Syntax
Default (Default)
New-AzBatchAccountKey
[-AccountName] <String>
[-ResourceGroupName <String>]
-KeyType <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzBatchAccountKey cmdlet regenerates the primary or secondary key of an Azure Batch account. The cmdlet returns a BatchAccountContext object that has its current PrimaryAccountKey and SecondaryAccountKey properties.
Examples
Example 1: Regenerate the primary account key on a Batch account
New-AzBatchAccountKey -AccountName "pfuller" -KeyType "Primary"
AccountName : pfuller
Location : westus
ResourceGroupName : CmdletExampleRG
DedicatedCoreQuota : 20
LowPriorityCoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com
This command regenerates the primary account key on the Batch account named pfuller.
Parameters
-AccountName
Specifies the name of the Batch account for which this cmdlet regenerates a key.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Name |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-KeyType
Specifies the type of key that this cmdlet regenerates. Valid values are:
- Primary
- Secondary
Parameter properties
Type: | String |
Default value: | None |
Accepted values: | Primary, Secondary |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResourceGroupName
Specifies the resource group of the account for which this cmdlet regenerates a key.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.