Episode Details
Back to Episodes
Using PowerShell to automate all things Azure and Microsoft 365 with Matthew Dowst [MVP]
Season 2
Published 1 month ago
Description
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, AN
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, AN