PotentEngineer

Intune, ConfigMgr, PowerShell and more...

15 minute read

Introduction

This one goes out to Tay, also known as SwiftOnSecurity. We had a discussion in late 2024 around policy management in the enterprise, so here we are.

I have been deploying OS, app, device, and whatever else comes along policies in mid to large enterprises for most of my career. They say the best way to learn is through failure and I have had my fair share of outage causing failures with many a lesson along the way.

My first big lesson was always testing scripts before deploying them. This is a simple lesson that is known by most at this point, but valid nonetheless. Mix equal parts confidence, excitement, lack of experience, and a missing parameter and boom, you wipe out ~300 nurse managers user profiles trying to clean up some disk space. This was one of my first big deployments.

My next big lesson was not to modify active production deployments. I was helping a co-worker troubleshoot a ConfigMgr collection that didn’t have any members. Easy, right? Until you realize that collection you just fixed had a required task sequence deployment with multiple restarts in it. What did the collection members jump to? Only about 10,000 workstations and servers. After the unstoppable 6 hour outage, I was terrified explaining that one to our VP. This outage led to the split of our single ConfigMgr environment into five separate workstation and server environments later that year, which I am thankful for today.

These lessons, along with many others, have shaped the robust set of practices outlined below. Our teams apply these practices across multiple endpoint management tools to minimize risk, avoid impacting user experiences, and prevent outages. Whether we’re using Group Policy, Intune, ConfigMgr, JAMF, or other tools, these guidelines help keep everything running smoothly.

Summary

This is a very lengthy post, but I did not want to separate it into multiple posts, so here is a summary of the major points.

Environment setup

Lower environments

Everyone has a test environment, some are just in Production.

Deployment targets

Least privilege and separation of duties

Standards and change control

Documentation

In order for these practices to be effective, they need to be documented so that the value is well known and they can be enforced. Awareness is your friend, especially in urgent and emergency circumstances. If your requestors and leaders are not aware of these processes, they generally won’t be happy when they want something to happen now.

Change control

Another method to enforce these standards is through a change control process. ITIL is a popular choice. I don’t think anyone likes change control, but it is a necessary evil. In many organizations, change control is an enterprise requirement, so you don’t always have to be the bad guy.

Preperation, Implementation, and validation

Automation

One of the most disappointing feelings is when you miss a simple checkbox, step, make a syntax error. The simple things. Where it makes sense, you should automate these steps. Even just a simple script to make sure all boxes were checked can be a lifesaver one day. It only takes one time for a script to catch something to prove it’s worth.

Here are a few examples of easily missed implementation steps where automation can help.

For mature environments, don’t touch prod, use Continuous Integration/Continuous Deployment (CI/CD) pipelines. Human’s make the changes in the lower environment, scripts turn them to Prod. There are some great tools to help with this like IntuneCD (Tobias Almén) and M365DSC (Microsoft).

Implementation preperation

Data and visibility are key to helping eliminate unknowns and reduce risk. If you need to change software or configurations, first inventory your environment to see what it looks like currently. Do not rely on assumptions or accept unknowns where possible.

Tooling

There are many tools that can provide visibility into your environment and help decision making. Use them. Many environments have the tools in place but they are highly underutilized.

Sometimes data in one tool might be incomplete or even inconsistent, cross-reference tools if you have to. Here are a few examples.

Determining the need for change

What is better than covering all your bases and having a flawless implementation? Not need to implement that change in the first place. Use the tools above to make the most educated decisions. You may not need to introduce as much risk or potential impact as you expected. I have had many direct experiences where data saved the day and prevented change. For well-planned changes this is helpful, but it also can save the day in emergency situations. Below are a couple examples.

Preparing for implementation

When you are ready to move forward with implementing something new, save future you some trouble, and do as much preperation as possible before you implement. This means preparing the actual scripts, paperwork, and the actual change beforehand. If you are scheduled to implement at 7pm, do not sign-on at 7pm and start getting everything prepped. Do it the day before or the day of, so that implementation can be just that and nothing more.

Validation

Validation is ensuring that your change was successful. Successful means that it did what you expected it to. You can successfully install software and also have unforeseen negative impacts.

Conclusion

All the practices outlined above are lessons learned through trial and error. Some of them I may not have been the largest supporter of at first, but over time I came to see the benefit which ended up in me and my organization’s favor. You may not need all of these, but consider what makes sense in your environment.

What are some of the ways you have reduced risk in your environment?

p.s, a thank you to the many folks that have helped build these processes along the way. Jerry Boehnlein, Jim Parris, Mike Cook, Darren Chinnon, Scott Forshey, Jason Luckey, Matt Wright, Jason Mattingly, Nick Combs, Tim Robinson, Scott Hublar, Rex Ference, Sam Himburg, Paul Humphrey, Danny Hutchinson, Shaun Poland, and probably a few more than I cannot remember.