你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-AzBatchPool
删除指定的 Batch 池。
语法
Remove-AzBatchPool
[-Id] <String>
[-Force]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Remove-AzBatchPool cmdlet 删除指定的 Azure Batch 池。 系统会提示你进行确认,除非使用 Force 参数。
示例
示例 1:按池 ID 删除 Batch 池
Remove-AzBatchPool -Id "MyPool" -BatchContext $Context
此命令删除 ID 为 MyPool 的池。 在删除操作发生之前,系统会提示用户进行确认。
示例 2:强制删除所有 Batch 池
Get-AzBatchPool -BatchContext $Context | Remove-AzBatchPool -Force -BatchContext $Context
此命令将删除所有 Batch 池。 由于存在 Force 参数,因此将取消确认提示。
参数
-BatchContext
指定此 cmdlet 用于与 Batch 服务交互的 BatchAccountContext 实例。 如果使用 Get-AzBatchAccount cmdlet 获取 BatchAccountContext,则在与 Batch 服务交互时将使用Microsoft Entra 身份验证。 若要改用共享密钥身份验证,请使用 Get-AzBatchAccountKey cmdlet 获取填充其访问密钥的 BatchAccountContext 对象。 使用共享密钥身份验证时,默认使用主访问密钥。 若要更改要使用的密钥,请设置 BatchAccountContext.KeyInUse 属性。
类型: | BatchAccountContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Force
强制命令运行而不要求用户确认。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Id
指定要删除的池的 ID。 不能指定通配符。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |