Running the Orchard Command Line Interface in Azure
Since we’re big Orchard and Azure users at Cloud Construct, we love sharing tips and tricks with the developer community. There may be instances where you want to access the Orchard Command Line Interface (CLI) in your staging or production site hosted in Azure. I ran into a scenario where a disabled module was added as a dependency of an already enabled module, causing the site to crash. Instead of hacking up the database, or trying to adjust the cache.dat file, I was able to access the Orchard CLI using Kudu. You can access the Kudu tools using a similar URL to this one: .
Just replace the ***** with the name of your azure site.
Since Kude gives you access to command line on that shared site, you can navigate to the Orchard bin folder and run Orchard commands by starting the statement of with Orchard (since there is an Orchard.exe in that folder). In order to enable my module, it looked something like this:
That’s it! I’m sure there are some other pretty cool use cases regarding this feature, if you know some, please share in the comments, below.. It seems pretty easy to test data and features running on the site by just setting up custom commands and running them through the Kudu app, something my colleagues and I at our agency Cloud Construct will continue to test and share as we learn more.