azure - 使用 Az Powershell 禁用 azure function 应用远程调试

标签 azure powershell

有谁知道如何使用 Az Powershell 禁用远程调试? 我知道我们可以使用 az cli 来做到这一点,它看起来像这样

az functionapp 配置集\ --name 应用程序名称\ --ftps-state“已禁用”\ --订阅 mysubscription\ --远程调试启用假\ --resource-group myresourcegroup

任何帮助都会很棒。

谢谢

最佳答案

尝试下面的命令,它在我这边工作得很好。

$Resource = Get-AzResource -ResourceGroupName <Resource Group Name> -ResourceType Microsoft.Web/sites/config -ResourceName "<Function App Name>" -ApiVersion "2018-02-01"
$Resource.Properties.remoteDebuggingEnabled = "False"
$Resource | Set-AzResource -ApiVersion "2018-02-01" -Force

enter image description here

关于azure - 使用 Az Powershell 禁用 azure function 应用远程调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56878751/

相关文章:

.net - 从Powershell调用.net 1.1

Azure 交互式 shell 历史记录

node.js - 在azure中配置node js时有没有办法指示架构(32位或64位)?

c# - 如何将文件上传到blob容器?

azure - 您可以直接使用 MQTT 通过 Azure 设备预配服务重新预配设备吗?

json - PowerShell JSON 字符串转义(反斜杠)

amazon-web-services - AZURE 中的哪些服务提供无服务器 HIVE,同样 AWS 提供 Athena

windows - 如何在 Inno Setup 安装程序后运行 PowerShell 脚本

powershell - 有没有办法以编程方式获取 Azure AD 客户端 key 的描述?

javascript - 在 Powershell 中获取 JavaScript 结果