gpt4 book ai didi

Azure 自动化帐户 Runbook 出现 AZ 错误

转载 作者:行者123 更新时间:2023-12-03 04:56:29 27 4
gpt4 key购买 nike

当尝试设置 Runbook 以缩小应用服务计划的大小时,我收到以下错误。我怎样才能克服这个错误?

我知道我的 PS 有效且有效。

Set-AzAppServicePlan -Name 'plan-api-dev' -ResourceGroupName 'rg-dev' -Tier S1 -WorkerSize Small

--

System.Management.Automation.CommandNotFoundException: The term 'Set-AzAppServicePlan' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

最佳答案

Set-AzAppServicePlan cmdlet 属于 Az.Websites 模块。正如在使用模块之前将其导入 Powershell 一样,您需要确保已将 Az.Websites 模块导入到您的自动化帐户中。您可以引用THIS文档以了解如何执行此操作。

关于Azure 自动化帐户 Runbook 出现 AZ 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68262103/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com