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

Mirko PetersPodcasts1 hour ago27 Views


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 restartable
  • Poor error handling and logging
  • Automating inefficient processes instead of improving them
  • Overloading scripts with too many responsibilities

A 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 scripts
  • Save and reuse scripts as templates
  • Focus on repeatability and scalability
  • Build a habit of automation early

This 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 inefficient
  • Power Automate complements, not replaces, PowerShell
  • GUI-based automation does not scale for enterprises
  • Most organizations struggle with process issues, not tooling
  • Microsoft Graph will enhance PowerShell, not replace it

FINAL 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.



Source link

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
May 2026
MTWTFSS
     1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
« Apr   Jun »
Follow
Search
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...

Discover more from 365 Community Online

Subscribe now to keep reading and get access to the full archive.

Continue reading