作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要使用 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/
我是一名优秀的程序员,十分优秀!