Avoid Windows Task Scheduler When Running Microsoft 365 PowerShell Scripts
Many people use the Windows Task Scheduler to run PowerShell scripts. The Task Scheduler works, but it creates a dependency on a specific workstation and isn't as secure as you might like. Running Microsoft 365 PowerShell scripts in Azure Automation is a much better idea. It's time to dump the Task Scheduler!