I have a PowerShell script that i want to run every 6 hours as a task scheduler on Azure. But the concern is that I don't want any Virtual machine for that. So is there any way so that it can be done without the creation of any virtual machine?

- 12,191
- 1
- 19
- 42

- 99
- 2
- 13
-
Take a look at Azure Automation - https://azure.microsoft.com/en-au/services/automation/. You can run PowerShell scripts on a schedule using this service. – Gaurav Mantri Nov 28 '17 at 10:35
-
I have gone through the blog and found Runbook. – Sandeep Anand Nov 28 '17 at 12:27
-
@SandeepAnand You could select Runbook or Azure function app. I add it as an answer. Hope it helps. – Shui shengbao Nov 29 '17 at 07:51
2 Answers
There is many choices you could do this in Azure.
1.As Gaurav Mantri said, you could use Azure Automation, you could create a runbook and schedule it starting at a specified time. More information please refer to this link.
2.Use Azure Function App. You could create a TimerTrigger - PowerShell
, like below:
More information please refer to this link.
Note: Azure automation and function app all provide FREE UNITS (PER MONTH)
.
Hope it helps.

- 1
- 1

- 18,746
- 3
- 27
- 45
-
Shui Well thanks sir for the help. Appreciate it. I am getting the desired result. Function app is the thing. – Sandeep Anand Nov 30 '17 at 07:30
For PowerShell currently Azure Automation is the preferred service as it is experimental currently in Functions.
https://learn.microsoft.com/en-us/azure/azure-functions/supported-languages
Experimental support for PowerShell is limited to version 4.0 because that is what's installed on the VMs that Function apps run on. If you want to run PowerShell scripts, consider Azure Automation.

- 238
- 3
- 7