你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzureRmBatchAccountKey
重新生成 Batch 帐户的密钥。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
New-AzureRmBatchAccountKey
[-AccountName] <String>
[-ResourceGroupName <String>]
-KeyType <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
New-AzureRmBatchAccountKey cmdlet 重新生成 Azure Batch 帐户的主密钥或辅助密钥。 该 cmdlet 返回一个 BatchAccountContext 对象,该对象具有其当前 PrimaryAccountKey 和 SecondaryAccountKey 属性。
示例
示例 1:在 Batch 帐户上重新生成主帐户密钥
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
此命令在名为 pfuller 的 Batch 帐户上重新生成主帐户密钥。
参数
-AccountName
指定此 cmdlet 为其重新生成密钥的 Batch 帐户的名称。
Type: | String |
Aliases: | Name |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyType
指定此 cmdlet 重新生成密钥的类型。 有效值为:
- 主
- 次要
Type: | String |
Accepted values: | Primary, Secondary |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
指定此 cmdlet 为其重新生成密钥的帐户的资源组。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |