I use Azure’s automation accounts to stop and start virtual machines when they are not needed. One of our machines is used to host backups and is only used for a limited amount of time during the day when the backups run so it is shut down automatically after the backups have completed.
Recently I ran some cleanup on my Azure subscription to get rid of some old test machines and in doing so removed one of the machines that was listed in an exclusion list of machines that should not be started or stopped (as I did not want this obsolete test machine starting on a daily basis).
Navigating to the Dashboard / Automation Accounts / Jobname / Scheduled Job/All logs shows that there is an invalid computer name.
It turns out that removing a machine from the Azure inventory but still keeping it in the VM’s exclude list actually stops the entire script from running. Short term fix is to remove it from VM’s Exclude list and the machines start to run again. The long term fix (one day) is to continue if the Exclude list contains invalid servers.