Disable-AzureBatchAutoScale [英] Disable-AzureBatchAutoScale

查看:106
本文介绍了Disable-AzureBatchAutoScale的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试在自动化脚本中使用此命令来禁用现有的自动缩放规则

I'm tryin to use this command in my automation script to disable a existing autoscale rule

https://docs.microsoft.com/zh-cn/powershell/module/azurerm.batch/disable-azurebatchautoscale?view=azurermps-6.9.0

https://docs.microsoft.com/en-us/powershell/module/azurerm.batch/disable-azurebatchautoscale?view=azurermps-6.9.0

https://docs.microsoft.com/zh-cn/dotnet/api/microsoft.azure.commands.batch.batchaccountcontext?view=azurerm-ps

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.commands.batch.batchaccountcontext?view=azurerm-ps

但是我对输入参数的值感到困惑

But I'm kind of confused about the value for the input parameter 

< BatchAccountContext>

-BatchContext <BatchAccountContext>

我尝试使用输出 命令get-azurermcontext作为此参数的输入,但没有运气

I've tried using the output of command get-azurermcontext as input to this parameter but no luck

[Microsoft.Azure.Commands.Batch.BatchAccountContext] $ context = Get-AzureRmContext

[Microsoft.Azure.Commands.Batch.BatchAccountContext]$context=Get-AzureRmContext

有什么想法吗?

推荐答案

嗨罗希特,

要通过批处理服务数据平面进行身份验证,您需要创建一个BatchAccountContext,这意味着您需要获取批处理帐户密钥.

To authenticate with the Batch service data plane, you need to create a BatchAccountContext, which means you'll need to get the Batch account keys.


上下文= Get-AzureRmBatchAccountKeys -AccountName< account_name>
context = Get-AzureRmBatchAccountKeys -AccountName <account_name>

有关更多信息:

https://docs.microsoft.com/zh-cn/azure/batch/batch-powershell-cmdlets-get-started#create-a-batchaccountcontext-object

https://docs.microsoft.com/en-us/azure/batch/batch-powershell-cmdlets-get-started#create-a-batchaccountcontext-object

谢谢!

Brian


这篇关于Disable-AzureBatchAutoScale的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆