0

I need to run a powershell script on a schedule using azure functions, I tried to execute the file using node.js but it's not working and i can't figure out why.

1 Answer 1

5

While my original answer was correct at the time, Azure has been updated to support Azure Functions utilizing Powershell: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell


Original Answer:

To me Azure Automation (https://learn.microsoft.com/en-us/azure/automation/) seems like a better model for running a Powershell script on a schedule in Azure since it really is a native capability of that tool.

If you really want to do it in an Azure Function it does look like there are some resources you could try (I have not tested them):

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

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

Best of luck!!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.