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

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

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.

Det här avsnittet är hämtat från ett öppet RSS-flöde och publiceras inte av Podme. Det kan innehålla reklam.

Avsnitt(869)

The Death of the Chatbot: Why Your Dataverse Strategy Is Broken

The Death of the Chatbot: Why Your Dataverse Strategy Is Broken

Microsoft Copilot has transformed how organizations interact with AI, making conversational experiences more accessible than ever. But while chat-based AI delivers immediate productivity gains, it doe...

29 Juli 1h 41min

The Future of IT Is Agentic: Inside Windows 365, Intune & Microsoft's AI Vision with Christiaan Brinkhoff

The Future of IT Is Agentic: Inside Windows 365, Intune & Microsoft's AI Vision with Christiaan Brinkhoff

Christiaan Brinkhoff shares the remarkable career path that took him from speaking at community events and writing technical blogs to becoming one of the key people behind Microsoft's modern cloud des...

29 Juli 1h 29min

How Do You Successfully Deploy Microsoft 365 Copilot Across an Enterprise?

How Do You Successfully Deploy Microsoft 365 Copilot Across an Enterprise?

A successful Microsoft 365 Copilot deployment begins long before licenses are assigned. Organizations should first define measurable business outcomes, identify high-value use cases, and secure execut...

29 Juli 1h 32min

From Pilot to Production: Building Enterprise AI That Actually Delivers with Leon Gordon [MVP]

From Pilot to Production: Building Enterprise AI That Actually Delivers with Leon Gordon [MVP]

Leon Gordon explains why most enterprise AI initiatives never reach production and introduces the concept of the Pilot Tax—the hidden cost organizations pay when AI projects remain stuck in proof-of-c...

28 Juli 59min

Microsoft Purview is a Trap: The Hard Truth About Data Governance

Microsoft Purview is a Trap: The Hard Truth About Data Governance

Microsoft Purview is included with many Microsoft 365 subscriptions, making it incredibly easy to enable. That convenience is also its biggest danger. Because there is no procurement process or large ...

28 Juli 1h 1min

From Excel Expert to Microsoft MVP: Empowering Millions with Data, Dashboards & AI with Karen Abecia [Microsoft MVP]

From Excel Expert to Microsoft MVP: Empowering Millions with Data, Dashboards & AI with Karen Abecia [Microsoft MVP]

aren Abecia shares the remarkable journey that transformed a passion for Microsoft Excel into a global career as one of the world's best-known Excel educators. She explains how discovering creative sp...

27 Juli 59min

The Copilot Credit Trap- Why Your AI Economy is Already Broken

The Copilot Credit Trap- Why Your AI Economy is Already Broken

For decades, enterprise software followed a predictable financial model. Organizations purchased licenses, assigned them to users, and budgeted annual IT spending with confidence. AI changes that comp...

26 Juli 1h 12min

The End of AI Bloat: Why Modern Agents Need Skills

The End of AI Bloat: Why Modern Agents Need Skills

Many AI agents start out fast, responsive, and surprisingly intelligent. But after a few months of real-world use, something changes. Response times increase, costs rise, prompts become enormous, and ...

26 Juli 1h 13min

Populärt inom Politik & nyheter

svenska-fall
p3-krim
aftonbladet-daily
aftonbladet-krim
flashback-forever
tv4-nyheterna-story
rss-sanning-konsekvens
rss-krimreportrarna
rss-krimstad
motiv
rss-frandfors-horna
de-fyras-gang
rss-vad-fan-hande
mannen-utan-spar
rss-flodet
politiken
rss-aftonbladet-krim
spar
krimmagasinet
olyckan-inifran