Skip to content
adatum
  • Home
  •  About adatum
  •  Learn Azure Bicep
  •  SCOM Web API
Azure

Recording available: Complex ARM templates

  • 12/10/202007/01/2025
  • by Martin Ehrnst

Together with MVP and Regional Director, Marcel Zehner we are running four live streams on Azure Resource Manager deployments using ARM templates. Recording from our first live stream, Complex ARM templates is available now.

In this session, we covered how you should use parameters, functions, and dependencies to create more reusable code, and how to control the result of your user’s input.

You can find the recording on YouTube, and the script examples on GitHub

More ARM template live streams

We have three more ARM template live streams planned- hopefully we will see you there:

Nested & linked ARM templates
Date & Time: October 12, 2020, 5PM CEST
Registration: https://lnkd.in/deW4xXJ
Attendee Link: https://lnkd.in/dz_WgyW

Deployment scripts
Date & Time: October 19, 2020, 5PM CEST
Registration: https://lnkd.in/dhEYeMr

Code release using pipelines
Date & Time: October 26, 2020, 5PM CEST
Registration: https://lnkd.in/d_JuDuv

Share this:

  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
Martin Ehrnst Microsoft MVP 2021 Community

Microsoft MVP 2020-2021

  • 01/07/202007/01/2025
  • by Martin Ehrnst

Almost a year has passed since I received my first MVP award in the Azure category. Although it has been a challenging year personally, and with the ongoing pandemic. I am delighted to share that I was renewed as Microsoft MVP for 2020-2021.

As things hopefully normalize I hope to get back on the community saddle, and contribute more in person and virtually.

A big thanks to my family, fantastic colleagues at Intility, and my community friends. Have a great summer!

Read more about the Microsoft Most Valuable Professional program

Share this:

  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
Automation

Remediate Azure Policy with PowerShell

  • 11/06/202007/01/2025
  • by Martin Ehrnst

Azure Policy is there to help us with properly governed and secure infrastructure. However, Azure Policy requires management as well.

Lately, I have built a new set of policies to ensure diagnostic logs are forwarded to Azure Monitor Logs. Multiple policies and a policy initiative were deployed to multiple subscriptions and multiple customers. All this was made possible since we manage through Azure Lighthouse.

Automatic remediation of Azure Policy

The challenge faced after deploying the policy was how to remediate them. Since policies with effect ‘deployIfNotExists’ only apply to new or modified resources, I faced the job with clicking in the portal or figure out a way to do this with PowerShell.
I actually started with the portal, as I thought it would be a quick job. After doing one or two subscriptions I realized how much time I would use.

Azure policy compliance state

Given the fact that the imitative it self contained around 50 individual policies, and at the time 19 subscriptions. I figured spending some time in PowerShell was well worth it. There is also a pretty good chance I will find my self in the same situation pretty soon.

Create remediation task with PowerShell

To create a remediation task for a policy set you can use this script. It will connect to your subscription and get all non-compliant policies. Then start a policy remediation task for the individual policies.

Summary

Policies with effect “deployIfNotExist” only work for resources that are updated or created after the policy was applied. To remediate existing resources you will have to create the remediation tasks manually through the portal, or by using PowerShell (and REST API)

By the way, fellow Azure MVP Tao Yang has created everything you need in order to enable these policies your self. Please see GitHub for complete ARM templates. And please help him maintain everything by contributing.

Share this:

  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit

Posts pagination

1 … 7 8 9 10 11 … 37

Popular blog posts

  • Azure Application registrations, Enterprise Apps, and managed identities
  • HealthServiceStore.edb file growth
  • I have moved script logging to OMS
  • Azure Monitor Managed Prometheus
  • OpsMgr & External Services PT2

Categories

Automation Azure Azure Active Directory Azure Bicep Azure DevOps Azure Functions Azure Lighthouse Azure Logic Apps Azure Monitor Azure Policy Community Conferences CSP Monitoring DevOps GitHub Guest blogs Infrastructure As Code Kubernetes Microsoft CSP MPAuthoring OMS Operations Manager Podcast Powershell Uncategorised Windows Admin Center Windows Server

Follow Martin Ehrnst

  • X
  • LinkedIn

RSS feed RSS - Posts

RSS feed RSS - Comments

Microsoft Azure MVP

Martin Ehrnst Microsoft Azure MVP
Adatum.no use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Cookie Policy
Theme by Colorlib Powered by WordPress