首页 > 解决方案 > 在 Powershell 中启动和停止函数应用

问题描述

作为发布过程的一部分,我已停止并重新启动 Azure 函数应用。我导入了 AzurePowerShell 并使用了内联脚本。

enter code here
Stop-AzFunctionApp -Name fn-x-us-ed-HR02 -ResourceGroupName rg-t-HR02

低于错误。

术语“Stop-AzFunctionApp”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。

我尝试了“Stop-AzureRmWebApp”并得到了同样的错误。

我有 4 个功能应用程序,想在部署新应用程序之前停止,然后重新启动。

标签: azure-devopsazure-functions

解决方案


您似乎缺少最新的 Az.Functions 模块。确保从 PowerShell 库中导入 v1.0.0:https ://www.powershellgallery.com/packages/Az.Functions/1.0.0


推荐阅读