< Back

New-AzureRmBatchAccountKey

Tue Jan 29, 2019 9:35 pm

NAME New-AzureRmBatchAccountKey



SYNOPSIS

Regenerates a key of a Batch account.





SYNTAX

New-AzureRmBatchAccountKey [-AccountName] <String> [-DefaultProfile <IAzureContextContainer>] -KeyType {Primary | Secondary} [-ResourceGroupName

<String>] [<CommonParameters>]





DESCRIPTION

The New-AzureRmBatchAccountKey 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.





PARAMETERS

-AccountName <String>

Specifies the name of the Batch account for which this cmdlet regenerates a key.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-KeyType <String>

Specifies the type of key that this cmdlet regenerates. Valid values are:



- Primary



- Secondary



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the resource group of the account for which this cmdlet regenerates a key.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

BatchAccountContext







NOTES









Example 1: Regenerate the primary account key on a Batch account



PS C:\\>New-AzureRmBatchAccountKey -AccountName "pfuller" -KeyType "Primary"

AccountName : pfuller



Location : westus



ResourceGroupName : CmdletExampleRG



CoreQuota : 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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... accountkey

Get-AzureRmBatchAccountKeys

Azure Batch Cmdlets