How to Become a Desktop Engineer — Part 11: Automation

How to Become a Desktop Engineer — Part 11: Automation

How to Become a Desktop Engineer — Part 11 of 13

Automation

Part 10 gave you the language — PowerShell, the one skill every posting names. This is the eleventh post in a thirteen-part series on how to become a desktop engineer, and it is what the language is for: automation, the step that turns a good engineer into the person whose changes reach every device while they sleep. A script answers a ticket; a system answers the next hundred before anyone files them.

Remediation scripts: detect, then fix

Diagram of the remediation loop: Intune detect-then-fix on a schedule — detect, fix only if true, log what happened, report the fleet, review and tune.

The first system worth building is the one Part 10 already sketched: detect-then-fix. Intune calls them remediation scripts, and the pattern is the whole job in miniature. A detect script asks one question — is this true? A remediate script runs only when the answer is yes. Intune runs the pair on a schedule, across the fleet, and logs what happened.

The classic first remediation is the service that keeps stopping. The detect script checks whether it is running. If it is, nothing happens — the remediate script never runs, and that is the point. If it is not, the remediate script restarts it, and the log says which machine, when, and whether it worked. One ticket class, closed fleet-wide, without anyone opening the console.

Write the pair the way you would write a change request. The detect script must be boring: one condition, no side effects, no changes of any kind — a detect script that changes something is a remediate script wearing a disguise, and it will bite you on a machine you never tested. The remediate script must fail safely: if it cannot fix the problem, it says so in the log instead of trying harder and making it worse. Test both the way you test every change — one machine, then a pilot ring, then the fleet — because automation ships to five hundred machines at the same speed as a package, and the rings from Part 9 exist for exactly this.

On a timer, or on a trigger

Once a remediation works, the next question is when it runs — on a timer, or on a trigger.

Scheduled automation runs on a timer: the disk-space check every morning, the certificate report every Monday, the compliance sweep overnight. The timer fits when the job is the same every time and the value is in the rhythm — you want the answer regularly whether or not anything is wrong, because "nothing is wrong" is itself the report.

Event-driven automation runs on a trigger. A device enrols, and a policy and an app land on it untouched — that is Autopilot from Part 7, event-driven automation wearing a product name. A compliance state flips to non-compliant, and a remediation runs. A ticket arrives with a known pattern, and a script answers it before a human reads it.

The discipline is the same either way, and it is the part beginners skip: logging is part of the automation, not an afterthought. A script that runs and tells nobody is a script that never ran. Every automation writes down what it did, where, and whether it worked — and someone reads it. The log turns "I think the fleet is patched" into the list of the eleven machines that are not, and why.

Reporting that proves the fleet is healthy

Automation without reporting is a black box, and the job is not to run one — it is to prove the fleet is healthy when someone asks. The engineer who can show the numbers gets trusted with the next change.

Endpoint Analytics is the first stop: startup performance, app reliability, work-from-anywhere scores — Microsoft's read on how the fleet actually feels to use. It is the closest thing Intune has to an answer to "are our devices slow?" — where a complaint becomes a number you can work on.

Graph is the second stop, for reports the console will not give you. Part 10 taught you the language: Connect-MgGraph, then ask the tenant — which devices have not checked in for thirty days, which policies hold the most non-compliant devices. The console shows one screen at a time; a Graph query shows the whole fleet in one table, and can run on a schedule and land in your inbox.

Power BI is where the numbers become a story a manager can read. Dairy Farmers lists reports built "using PowerShell, MS Graph, ServiceNow, or Power BI" — and the order matters. PowerShell collects, Graph answers, Power BI presents. A dashboard showing patch compliance by ring, enrolment health by week and the top five failing apps ends the "are we patched?" meeting with a yes you can point at.

The workflow it lives in: ITSM

Automation does not live beside the process. It lives inside it, and the process has a name: ITSM. ServiceNow is the one most postings name — Simtra requires "ServiceNow or similar ITSM tools" — and Jira Service Management and Freshservice are the other names you will meet. The tool changes; the shape does not.

The shape is ITIL, three words you will hear in every enterprise shop: incident, problem, change. An incident is a thing that broke — a user cannot print, a service stopped. A problem is why incidents keep happening — the driver that breaks the spooler on one model. A change is the fix, recorded, approved and reversible. Automation touches all three: the remediation closing incidents before they are filed, the problem record explaining why the fix exists, the change record saying who approved it and how to roll it back.

This separates the engineer who scripts from the engineer who ships. A script with no change record is a surprise waiting for the next audit. A remediation with a problem record behind it is a decision someone can defend. Write the record first, then the script — the record is where the judgment lives.

The new arrivals: AI agents

One thing to watch, not to build on yet: Security Copilot agents in Intune. Microsoft added agents to the admin center promising pieces of this work — turning a document into a policy, reviewing a script-approval request, prioritising CVEs for remediation — and the MD-102 outline lists them. But they move fast, so verify before you build on them: as of late 2026, only the Vulnerability Remediation Agent is still available, in public preview; the Policy Configuration and Change Review agents were retired on 31 August 2026, and the Device Offboarding Agent on 1 June 2026. Read the current documentation, not the announcement: the agents that survive will be worth learning; the ones that do not will be a footnote, and your scripts will still be running.

The judgment call: what to automate, and what not to

Diagram of the four tests before automating: happens often, fails the same way, fails safely, tells you it failed — any test failed, leave it to a human.

Everything so far is the how. The judgment is the what — the skill that decides whether your automation makes the fleet better or makes the next outage worse.

Automate the work that passes four tests: it happens often enough to be worth the build; it fails the same way every time, so the fix is a rule, not a guess; it fails safely — when the automation is wrong, nothing breaks, and the log says so; and it tells you when it fails, because a silent automation is a liability, not a time-saver.

Do not automate the work that fails any of them: the one-off fix that will never repeat; the judgment call that needs a human — a VIP's device, a security incident, a change with no rollback; the fix you do not understand yet — automating an un-root-caused workaround is how a bad driver becomes a fleet-wide policy. And never automate the thing you cannot watch. If you cannot see it run, cannot read its log, cannot stop it — it is not automation, it is a hope with a schedule.

The test, in one sentence: the automation must fail safely and tell you it failed. Everything else is a detail.

Practise it this week

  • Build one remediation pair. Pick a service that keeps stopping, or a setting that keeps drifting, and write its detect and remediate scripts. Test on one machine, then a pilot ring. Read the log the next morning: did it run, did it fix anything, did it fail safely?
  • Schedule one report. Take a question you keep answering by hand — patch compliance by ring, devices that have not checked in — and turn it into a scheduled Graph query. The first time the report lands without you opening the console, the system exists.
  • Write the record before the script. Pick an automation you already run and write its problem record: what it fixes, why the fix is safe, how to roll it back. If you cannot write the record, you do not understand the automation well enough to run it yet.

Next up: Security & Compliance. The endpoint as a security boundary — Defender, BitLocker, baselines and vulnerability remediation — and how the compliance chain from Part 5 grows teeth.

Missed the earlier posts? Start with Part 1: What a Desktop Engineer Actually Does, Part 2: The Path, Stage by Stage, Part 3: The Mindset — Curiosity Is a Technical Skill, Part 4: Windows 11 Inside Out, Part 5: Identity: AD, GPO, Entra ID, Conditional Access, Part 6: Networking Essentials, Part 7: Intune + Autopilot, Part 8: SCCM & Co-management, Part 9: App Packaging & Patching, and Part 10: PowerShell Deep Dive.

Missed the earlier posts? Start with Part 1: What a Desktop Engineer Actually Does, Part 2: The Path, Stage by Stage, Part 3: The Mindset — Curiosity Is a Technical Skill, Part 4: Windows 11 Inside Out, Part 5: Identity: AD, GPO, Entra ID, Conditional Access, Part 6: Networking Essentials, Part 7: Intune + Autopilot, Part 8: SCCM & Co-management, Part 9: App Packaging & Patching, and Part 10: PowerShell Deep Dive.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.