Using PowerShell to automate all things Azure and Microsoft 365 with Matthew Dowst [MVP] episode artwork

EPISODE · May 6, 2026 · 42 MIN

Using PowerShell to automate all things Azure and Microsoft 365 with Matthew Dowst [MVP]

from M365.FM - Modern work, security, and productivity with Microsoft 365 · host Mirko Peters - Founder of m365.fm, m365.show and m365con.net

In this episode of the M365 podcast, host Mirko Peters sits down with PowerShell expert and automation architect Matthew Dowst. With over 20 years of experience, Matthew shares deep insights into automation across Microsoft 365 and Azure, drawing from his work in enterprise environments, community contributions, and real-world problem solving. The discussion explores how PowerShell has evolved, why it remains critical despite new tools like Copilot and Power Automate, and what the future holds for administrators.WHAT POWERSHELL REALLY IS: MORE THAN JUST SCRIPTING A central theme of the conversation is the identity of PowerShell. Is it a developer tool or an admin tool? According to Matthew, it is both—and that duality is exactly what makes it powerful. PowerShell enables simple administrative commands while also supporting full-scale automation solutions. It acts as a bridge between infrastructure, APIs, and services, allowing professionals to move beyond manual work into programmable environments.FROM SMALL SCRIPTS TO ENTERPRISE AUTOMATION Matthew shares how many professionals start with small, repeatable scripts—often in help desk or monitoring scenarios—and gradually expand into building full automation platforms. PowerShell’s object-oriented nature allows scripts to evolve into modular systems, where reusable functions and logic blocks can be combined into complex workflows. This progression highlights a key mindset shift: automation is not about isolated scripts, but about building adaptable systems.THE ROLE OF MICROSOFT GRAPH AND MODERN MODULES A major evolution in recent years has been the introduction of Microsoft Graph modules in PowerShell. Previously, administrators had to deal with fragmented tooling across services like Azure AD, SharePoint, and Exchange. The Graph ecosystem has unified access, making automation more consistent and standardized. While direct API calls still offer flexibility and control, PowerShell provides a more user-friendly abstraction, covering the majority of real-world use cases.POWERSHELL VS APIs: CONTROL VS MAINTAINABILITY The discussion highlights an important trade-off: using PowerShell modules versus direct API calls. PowerShell modules are easier to maintain and understand, especially in controlled environments. However, APIs provide tighter control and versioning when deploying solutions externally. This balance between convenience and precision is a recurring theme in automation design.WHY POWERSHELL STILL MATTERS IN THE AGE OF AI With the rise of Copilot and AI-driven tools, one might assume that PowerShell becomes less relevant. However, Matthew argues the opposite. PowerShell provides transparency and control—admins can inspect scripts before execution, ensuring predictable outcomes. AI may assist in generating scripts, but PowerShell remains the execution layer that professionals trust.AUTOMATION AT SCALE: WHERE GUI TOOLS FAIL Graphical interfaces are useful for one-off tasks, but they quickly break down at scale. PowerShell shines when dealing with hundreds or thousands of objects, enabling consistent and repeatable actions. The ability to process large datasets, automate bulk operations, and integrate logic makes it indispensable in enterprise environments.REAL-WORLD USE CASE: LOG4J VULNERABILITY RESPONSE One of the most compelling examples shared is how PowerShell was used during the Log4j security crisis. Matthew built a script that scanned entire environments—across Azure VMs and hybrid systems—to detect vulnerabilities. The script could even power on machines, scan them, and shut them down again, all in parallel. This level of automation enabled rapid identification and response, something impossible to achieve manually.REPORTING, VISIBILITY, AND CROSS-TENANT INSIGHTS PowerShell is also a powerful tool for reporting and visibility. The episode highlights scenarios where built-in Microsoft tools fall short, such as accurately tracking external sharing in SharePoint and OneDrive. By using PowerShell, organizations can extract precise, meaningful insights instead of overwhelming, noisy data.COST CONSIDERATIONS AND AZURE AUTOMATION From a financial perspective, PowerShell itself is essentially free to run locally. Even when using Azure Automation, the costs remain minimal compared to the value delivered. This makes it a highly cost-effective solution for enterprise automation.COMMON MISTAKES IN POWERSHELL AUTOMATION Matthew outlines several common pitfalls:Not designing scripts to be restartablePoor error handling and loggingAutomating inefficient processes instead of improving themOverloading scripts with too many responsibilitiesA key takeaway is that automation should be resilient and modular, allowing partial failures without breaking the entire process.TESTING IN CONSTANTLY CHANGING ENVIRONMENTS Testing automation in Microsoft environments is challenging due to constant updates and API changes. Matthew discusses strategies such as mocking APIs, replaying requests, and using dedicated test tenants. Building pipelines that reset environments to known states is critical for reliable testing.POWERSHELL AND THE FUTURE OF MICROSOFT ECOSYSTEMS PowerShell is not going away. Microsoft continues to invest in it, especially through its integration with .NET and Microsoft Graph. The company’s commitment ensures that anything achievable in the GUI will also be possible via PowerShell. As APIs expand, PowerShell’s capabilities grow alongside them.ADVICE FOR NEW AND FUTURE ADMINS For those starting out, the best way to learn PowerShell is practical:Recreate GUI tasks using scriptsSave and reuse scripts as templatesFocus on repeatability and scalabilityBuild a habit of automation earlyThis approach helps transform everyday tasks into reusable solutions.HOT TAKES AND KEY INSIGHTS The episode concludes with several strong opinions:Managing Microsoft 365 without PowerShell is inefficientPower Automate complements, not replaces, PowerShellGUI-based automation does not scale for enterprisesMost organizations struggle with process issues, not toolingMicrosoft Graph will enhance PowerShell, not replace itFINAL THOUGHTS The overarching message is clear: PowerShell remains a foundational skill for modern IT professionals. It empowers administrators to move from reactive work to proactive automation, delivering efficiency, consistency, and scalability. As the Microsoft ecosystem evolves, PowerShell continues to adapt—making it more relevant than ever.Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-fm-modern-work-security-and-productivity-with-microsoft-365--6704921/support.

In this episode of the M365 podcast, host Mirko Peters sits down with PowerShell expert and automation architect Matthew Dowst. With over 20 years of experience, Matthew shares deep insights into automation across Microsoft 365 and Azure, drawing from his work in enterprise environments, community contributions, and real-world problem solving. The discussion explores how PowerShell has evolved, why it remains critical despite new tools like Copilot and Power Automate, and what the future holds for administrators.WHAT POWERSHELL REALLY IS: MORE THAN JUST SCRIPTING A central theme of the conversation is the identity of PowerShell. Is it a developer tool or an admin tool? According to Matthew, it is both—and that duality is exactly what makes it powerful. PowerShell enables simple administrative commands while also supporting full-scale automation solutions. It acts as a bridge between infrastructure, APIs, and services, allowing professionals to move beyond manual work into programmable environments.FROM SMALL SCRIPTS TO ENTERPRISE AUTOMATION Matthew shares how many professionals start with small, repeatable scripts—often in help desk or monitoring scenarios—and gradually expand into building full automation platforms. PowerShell’s object-oriented nature allows scripts to evolve into modular systems, where reusable functions and logic blocks can be combined into complex workflows. This progression highlights a key mindset shift: automation is not about isolated scripts, but about building adaptable systems.THE ROLE OF MICROSOFT GRAPH AND MODERN MODULES A major evolution in recent years has been the introduction of Microsoft Graph modules in PowerShell. Previously, administrators had to deal with fragmented tooling across services like Azure AD, SharePoint, and Exchange. The Graph ecosystem has unified access, making automation more consistent and standardized. While direct API calls still offer flexibility and control, PowerShell provides a more user-friendly abstraction, covering the majority of real-world use cases.POWERSHELL VS APIs: CONTROL VS MAINTAINABILITY The discussion highlights an important trade-off: using PowerShell modules versus direct API calls. PowerShell modules are easier to maintain and understand, especially in controlled environments. However, APIs provide tighter control and versioning when deploying solutions externally. This balance between convenience and precision is a recurring theme in automation design.WHY POWERSHELL STILL MATTERS IN THE AGE OF AI With the rise of Copilot and AI-driven tools, one might assume that PowerShell becomes less relevant. However, Matthew argues the opposite. PowerShell provides transparency and control—admins can inspect scripts before execution, ensuring predictable outcomes. AI may assist in generating scripts, but PowerShell remains the execution layer that professionals trust.AUTOMATION AT SCALE: WHERE GUI TOOLS FAIL Graphical interfaces are useful for one-off tasks, but they quickly break down at scale. PowerShell shines when dealing with hundreds or thousands of objects, enabling consistent and repeatable actions. The ability to process large datasets, automate bulk operations, and integrate logic makes it indispensable in enterprise environments.REAL-WORLD USE CASE: LOG4J VULNERABILITY RESPONSE One of the most compelling examples shared is how PowerShell was used during the Log4j security crisis. Matthew built a script that scanned entire environments—across Azure VMs and hybrid systems—to detect vulnerabilities. The script could even power on machines, scan them, and shut them down again, all in parallel. This level of automation enabled rapid identification and response, something impossible to achieve manually.REPORTING,...

NOW PLAYING

Using PowerShell to automate all things Azure and Microsoft 365 with Matthew Dowst [MVP]

0:00 42:32

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Frequently Asked Questions

How long is this episode of M365.FM - Modern work, security, and productivity with Microsoft 365?

This episode is 42 minutes long.

When was this M365.FM - Modern work, security, and productivity with Microsoft 365 episode published?

This episode was published on May 6, 2026.

What is this episode about?

In this episode of the M365 podcast, host Mirko Peters sits down with PowerShell expert and automation architect Matthew Dowst. With over 20 years of experience, Matthew shares deep insights into automation across Microsoft 365 and Azure, drawing...

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this M365.FM - Modern work, security, and productivity with Microsoft 365 episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!