gpt4 book ai didi

azure - 如何在计划中的azure函数中运行powershell脚本

转载 作者:行者123 更新时间:2023-12-03 04:46:21 25 4
gpt4 key购买 nike

我需要使用 azure 函数按计划运行 powershell 脚本,我尝试使用 node.js 执行该文件,但它不起作用,我不知道为什么。

最佳答案

虽然我当时的原始答案是正确的,但 Azure 已更新为支持使用 Powershell 的 Azure Functions:https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell

<小时/>

原始答案:

对我来说,Azure 自动化 ( https://learn.microsoft.com/en-us/azure/automation/ ) 似乎是在 Azure 中按计划运行 Powershell 脚本的更好模型,因为它确实是该工具的 native 功能。

如果您确实想在 Azure Function 中执行此操作,那么您确实可以尝试一些资源(我尚未测试它们):

https://blogs.msdn.microsoft.com/powershell/2017/02/24/using-powershell-modules-in-azure-functions/

https://github.com/Azure/azure-functions-powershell-worker

祝你好运!!

关于azure - 如何在计划中的azure函数中运行powershell脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53745913/

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