January 31st, 2017

PowerTip: Find all the Azure Automation jobs that will run in the next two days

Doctor Scripto
Scripter

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to find all the Azure Automation jobs that will run in the next two days.

Hey, Scripting Guy! Question Is there a way to find all the Azure Automation jobs that will run in the next two days?

Hey, Scripting Guy! Answer Use the Get-AzureAutomationSchedule cmdlet, and check out the NextRun attribute. Here is an example:

Get-AzureRmAutomationSchedule -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName | Where NextRun -lt $(Get-Date).AddDays(2)

The Doctor

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.