Web Jobs now natively support PowerShell scripts. You can upload a zip file containing a .ps1 file and it will be executed without further configurations.
How to run PowerShell remotely on Azure Website
-
09-07-2023 - |
Question
Problem
I have website hosted on Azure as a Azure Website (not in a separate virtual machine).
I am going to create job that will run systematically, crawl and index site content.
I want to be able to run PowerShell on my PC which will work with remote date and show progress and result on my PC.
Also I want to create reports on PowerShell. As I do not have dummy boss that needs Excel reports in order to understand data. PowerShell is more convenient for IT-oriented person like me.
Idea
I have some idea and need validation from community. Is it a good idea to create PowerShell module DLL, add as reference to Web Application project? In this case I may be able to connect to site machine remotely (not sure) import module and work with it.
Solution
OTHER TIPS
Have you tried using the Kudu powershell interface? It lets you run powershell commands on your site directly from the browser
You can find it at: https:// [yoursitename] .scm.azurewebsites.net/DebugConsole/?shell=powershell
You'll need to login with your ftp user name and password