Use Azure Automation and PowerShell to Create a Daily Microsoft Entra Risk Report
In this article, Sean McAvinue explains how to use PowerShell and Azure Automation runbook to create a Daily Microsoft Entra Risk Report.
In this article, Sean McAvinue explains how to use PowerShell and Azure Automation runbook to create a Daily Microsoft Entra Risk Report.
A key aspect of a well-managed Microsoft 365 environment is to ensure that SharePoint sites are removed when they are no longer needed. In this blog, Sean McAvinue explores how to combine relatively basic PowerShell and Azure Automation skills with Power Automate to create a clean, robust way to manage the lifecycle of SharePoint sites in your Microsoft 365 tenant.
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!
Microsoft has long been asked to support guest account expiration, just like the functionality available for on-premises Active Directory accounts. Engineering priorities have not allowed the developers to work on the feature, but it's possible to do the job with PowerShell as we explain here.
Adaptive retention policies are great, but they require high-end Office 365 or Microsoft 365 licenses. The solution is to build your own version using PowerShell and Azure Automation. The code is reasonably straightforward and is a practical example of how to replicate a Microsoft 365 feature in your own way.
Every month, Microsoft generates a new version of the Graph PowerShell SDK. And if you use the SDK with Azure Automation, you must update automation accounts with the new modules. That's a pain to do manually, but easy to automate with PowerShell as we explain here.
The Office 365 audit log is a rich source of forensic information. This article explains how to use Azure Automation to search the log for high-priority events. We use the new support for managed identities in V3.0 of the Exchange Online management PowerShell module to search the audit log and end up sending a nice HTML-format message to administrators.
Until the arrival of V3.0 of the Exchange Online management module, Microsoft didn't support using an Azure Automation managed identity with Exchange Online PowerShell. In this article we explore how to use Exchange Online PowerShell with Azure Automation to get work done.
Running an Exchange hybrid server in Azure is easy; the challenge is cost - the savior is automation. This article covers how to automate your Exchange Hybrid server in Azure and significantly reduce the cost of running your hybrid server in Azure with basic start/stop solutions, progressing to maintenance scripts to ensure the server is kept up to date regularly. It also explores how the maintenance scripts can be expanded to cover scheduled reporting or other tasks.
It's great to be able to run PowerShell scripts using Azure Automation. It's even better when you can create output files in SharePoint Online. In this article, we explain how to create a report of Microsoft 365 Groups subject to the Group expiration policy and generate an HTML report in SharePoint Online using an Azure Automation runbook. Running this kind of job in the background is a great way of processing intensive jobs while you get on with more important tasks.
The Microsoft Graph PowerShell SDK is a good way to execute Microsoft Graph API queries from PowerShell scripts. In this article, we explain how to use cmdlets from the SDK with a Azure Automation runbook. The example we use is a script to send a welcome email to new employees.
As many organizations adapt legacy scripts to use app authentication instead of traditional service account credentials, security can be compromised if certain risks are overlooked. While app secrets can be great for testing code, there’s a reason they have an enforced expiry date - the longer a secret exists in production, the higher the risk it will become compromised. The methods described in this article will help build a good foundation for app authentication while keeping security top of mind when creating or updating automation scripts.