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

Doctor Scripto

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

0 comments

Discussion is closed.

Feedback usabilla icon