MSBA-219 · Lesson 9 of 12 · 19 min

Hands-on practice with a trial tenant

▶ Video coming soon A video version of this lesson is on the way.

The study guide for MD-102 says the same thing every associate study guide says: hands-on experience matters. Ama had plenty at Corvallin, but only with the features Corvallin uses. "You cannot practise Cloud PKI or Windows 365 on our production tenant," Ines said, "and you should not try." The answer was a separate practice tenant, built and used for three weeks, then deleted. This lesson describes how to set one up, what to practise in it and how to keep it safe and cheap.

Why a separate tenant

A practice tenant lets you break things. You can set enrolment restrictions to block everything, misconfigure Conditional Access, push a firewall policy that conflicts with a baseline and watch what happens, without affecting a single real user. It also lets you try features your organization does not license. Never practise on a production tenant: policies you create there can reach real devices through groups you forgot existed, and a test Conditional Access policy is an easy way to lock out administrators.

OptionWhat you getThings to know
Microsoft 365 or Enterprise Mobility + Security trial in a new tenantTime-limited licences that include Intune and Entra ID P1 or P2Use a new tenant with its own onmicrosoft.com domain; trials usually run about 30 days and need a payment method for some offers
Microsoft 365 Developer Program sandboxA developer tenant with sample usersEligibility was tightened in 2024; check whether you qualify, for example through a Visual Studio subscription
Intune Suite and Windows 365 trialsTime-limited trials of add-onsStart them only when you are ready to practise those topics, because the clock runs
Microsoft Learn exercisesGuided labs in some learning pathsShort and structured; good for a first look, not for free experiments

Ama used a new tenant with trial licences, created in her own name with a personal payment method on a card with a low limit, and a calendar reminder to cancel the trials before they converted to paid subscriptions. Everything else she needed was free: virtual machines on her home computer and Microsoft's evaluation media.

Building the lab

A diagram of a home lab. A practice tenant in the cloud with Entra ID, Intune and Defender. On a home computer, Hyper-V runs three virtual machines: a Windows 11 Enterprise VM with a virtual TPM for Autopilot, a second Windows 11 VM for conflicts and compliance, and an optional Windows Server VM for nothing but a Microsoft Tunnel test. A real Android or iOS test phone connects through Wi-Fi. Arrows show enrolment from each device to Intune.
A minimal home lab for MD-102 practice.

The lab needs three pieces. First, the tenant, with a handful of test users, a few groups and the trial licences assigned. Second, two or three Windows 11 virtual machines, using Microsoft's evaluation media for Windows 11 Enterprise, with a virtual TPM enabled so that Autopilot pre-provisioning and BitLocker work. Third, if possible, a spare phone: an old Android phone that can be factory reset, or an iPhone that is not your own. Mobile enrolment is hard to understand without seeing the screens.

For **Autopilot**, a virtual machine needs its hardware hash registered in the tenant. The common way is to run Microsoft's `Get-WindowsAutopilotInfo` script from the PowerShell Gallery on the VM during setup, which can upload the hash directly with an administrator's sign-in. Then create a deployment profile, assign it, reset the VM and watch the out-of-box experience. To practise **device preparation**, use another VM without registering its hash.

Registering a lab VM's hardware hash with a group tag. Run it from an elevated PowerShell window during or after setup; check the script's current options on the PowerShell Gallery.
Install-Script -Name Get-WindowsAutopilotInfo -Force
Get-WindowsAutopilotInfo -Online -GroupTag LAB

A practice plan by domain

The lab is only useful with a plan. Ama wrote one task list per domain, chosen from the objectives her practice assessment showed she had never performed.

DomainLab tasks
1. InfrastructureCreate a dynamic device group from a group tag; block personal Windows enrolment, then enrol a VM and see the error; build a compliance policy and a report-only Conditional Access policy, then switch it on; deploy Windows LAPS and read the password
2. DevicesRun user-driven Autopilot with an ESP that blocks on one app; try device preparation on a second VM; set up a name template; import an ADMX file; create a filter and test it on two VMs; run a device query; try EPM elevation rules
3. ProtectionCreate conflicting firewall settings and find the conflict report; enable BitLocker silently; onboard a VM to Defender for Endpoint; create update rings with different deferrals
4. ApplicationsPackage a small Win32 app with the Content Prep Tool; break its detection rule on purpose; deploy a Store app; apply an app protection policy to Outlook on the test phone
5. Automation and monitoringConnect with Graph PowerShell and list devices; write a Remediations pair that creates and then fixes a registry value; build a custom compliance check; export a report

Breaking things on purpose taught her most. A detection rule pointing to the wrong file version made Intune report a successful install as failed and reinstall the app at every check-in, exactly the scenario a question had described. A firewall setting duplicated between a baseline and an endpoint security policy produced a conflict entry she could then recognize in an exhibit. Blocking personal Windows enrolment and then joining a VM through Settings reproduced the error a Corvallin user had hit in October.

Worked problem

Turning a weak area into a lab task

Ama's practice result was weak on Windows 365. The trial is limited in time and Cloud PCs cost money after it ends. How should she practise efficiently?

Show solution
  1. List the objectives: provisioning policies, network connections, image management.
  2. Start the Windows 365 trial only on the day she has three free hours.
  3. Create one provisioning policy with a Microsoft-hosted network and a gallery image, assign one test user, and watch provisioning.
  4. Read, without building, how an Azure network connection is created, since it needs an Azure subscription and virtual network.
  5. Delete the Cloud PC and end the trial the same week.

Answer: One short, planned session covers the provisioning flow; the network connection is learned from documentation and diagrams. Planning the session before starting the trial avoids paying for idle Cloud PCs.

Keeping the lab safe and cheap

A practice tenant is still a real Microsoft 365 tenant. Use strong, unique passwords and MFA for its admin accounts. Do not connect real work data or real personal email to it. Do not enrol your own phone into it unless you are ready to reset the phone. Turn off or delete VMs when you finish a session. Cancel trials before they convert, and when the exam is over, remove licences and delete the tenant or leave it with no paid subscriptions.

A Remediations pair to build in the lab

Domain 5 asks about Remediations, and the fastest way to understand them is to write one. Ama's first lab script pair checked that a registry value existed and created it when it did not. It is deliberately trivial, so that any problem is in the plumbing rather than the logic. The detection script returns exit code 1 when the value is missing, which tells Intune to run the remediation script; the remediation script creates the value; and the next detection run should then return 0.

A lab detection script. Exit 0 means no issue; exit 1 means the remediation should run.
# Detection script
$path = "HKLM:\SOFTWARE\LabBaseline"
$item = Get-ItemProperty -Path $path -Name "Version" -ErrorAction SilentlyContinue
if ($item.Version -eq "2") {
    Write-Output "Version 2 present"
    exit 0
}
Write-Output "Version missing or wrong"
exit 1
The matching remediation script. It runs in the system context by default, so it can write to the local machine hive.
# Remediation script
$path = "HKLM:\SOFTWARE\LabBaseline"
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name "Version" -Value "2"
Write-Output "Version set to 2"

In Intune, the pair goes into a script package under Remediations, assigned to a device group with a schedule. After the first run, the Remediations report shows the device with the issue detected and fixed. Ama then deleted the registry key by hand on one VM and waited for the next scheduled run to see the issue appear again as recurred, which is exactly the vocabulary the report uses and that questions borrow.

Things that go wrong in home labs

Every lab breaks in predictable ways, and fixing those breaks is itself useful practice. The most common problem is time: virtual machines that sit switched off for a week fall behind on updates and policy, and the first check-in after starting them can take a long time. Starting the VMs half an hour before a study session and running a manual sync from Company Portal or the Settings app saves frustration.

The second problem is identity. A VM that was set up with a local account before the tenant existed cannot be turned into an Autopilot device without a reset. Ama learned to treat VMs as disposable: she kept a clean checkpoint taken just before the out-of-box experience, so that each Autopilot test began from the same state in two minutes rather than a full reinstall.

The third problem is licensing. Trial licences have to be assigned to the test users, and some features check for them only at certain moments. A user who receives an Intune licence after trying to enrol may need to sign out and back in before enrolment succeeds. When something fails in the lab, checking the user's licences is a good first step, and the habit carries over to exam questions, where a missing licence is one of the commonest hidden causes.

The last problem is scope. A practice tenant can tempt you into building everything. Ama kept a strict rule: each lab session had one objective from her weak list, a single task, and a written note at the end describing what she saw. Thirty minutes spent on one objective produced better recall than three hours of wandering through the portal.

Keeping a lab notebook

Ama's lab notebook was a single document with one entry per session. Each entry had the objective from the outline, what she did, what she expected, what actually happened and the one fact she wanted to remember. The last column became part of her trap list in lesson 10. For example, after the Windows 365 session, her one fact was that the provisioning policy decides the network and image while the licence decides the size. After the custom compliance session, it was that the setting names in the JSON rules must exactly match the property names the discovery script returns. These are small facts, but they are the ones that decide close questions.

What a lab cannot teach

A practice tenant has limits, and it helps to know them in advance. It has no history, so reports that depend on weeks of data, such as Endpoint analytics baselines or update compliance trends, stay nearly empty. It has a handful of devices, so scale problems, such as assignment delays or throttled Graph requests, do not appear. It has no real users, so the human side of enrolment, such as staff who do not want a work profile on their phone, is missing. For these, the earlier content courses and your own workplace are better teachers. Ama filled the gap by reading Corvallin's real reports with fresh eyes, asking for each one which exam objective it belonged to.

Some features also need hardware or services that a home lab cannot easily provide. Apple automated device enrolment needs Apple Business Manager and a device bought through it or added by a reseller. Knox Mobile Enrollment needs Samsung devices and a Knox account. Microsoft Tunnel needs a Linux server. For these, Ama read the documentation, studied the setup screens through screenshots in Microsoft Learn modules, and focused on what each needs and what it does, which is the level the exam usually tests.

Her cleanup list for after the exam reversed the order in which she had built the lab: remove the test devices from Intune and Autopilot, delete the VMs, cancel the remaining trials, and then remove any paid subscriptions so that no charges could follow.

Lab tasks as exam questions

A good test of a lab session is whether you could now write an exam question about it. After each session, Ama wrote one original question with four options, using the mistake she had made or nearly made as the correct answer's distractor. Writing questions forced her to state the deciding fact precisely, and by the end of the three weeks she had a personal question bank of about twenty items, all original, all tied to things she had actually seen. Ines reviewed them and added the best ones to the practice sets she was writing for the capstone. The habit also made the real exam's questions feel familiar in shape: she had spent three weeks thinking about how a question about each objective would be built.

Common mistakes

  • MistakePractising risky settings in the production tenant.

    InsteadUse a separate tenant; policies in production can reach real devices through forgotten groups.

  • MistakeStarting every trial on day one.

    InsteadStart time-limited trials when you are ready to use them, and cancel before they convert.

  • MistakeCreating a VM without a virtual TPM.

    InsteadEnable a virtual TPM so BitLocker and Autopilot pre-provisioning work.

  • MistakeOnly following guided steps.

    InsteadBreak things on purpose, then find the cause in reports, as exam exhibits will ask you to.

Summary and key terms

  • Use a separate practice tenant with trial licences; never experiment in production.
  • A minimal lab is a tenant, two or three Windows 11 Enterprise VMs with virtual TPM, and a spare phone.
  • Register a VM for Autopilot with Get-WindowsAutopilotInfo; use another VM without a hash for device preparation.
  • Plan lab tasks from the objectives your practice assessment shows you have not performed.
  • Secure the lab, keep costs low, and clean up trials and tenants when finished.
Practice tenant
A separate Microsoft 365 tenant used only for learning and experiments.
Virtual TPM
A software TPM for a virtual machine, needed for BitLocker and some Autopilot modes.
Hardware hash
A device identifier uploaded to register a device for classic Autopilot.
Group tag
A label on an Autopilot device record, used in dynamic group rules.
Evaluation media
Time-limited Windows installation media from Microsoft for testing.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Why should a lab VM have a virtual TPM?

    Show answer

    BitLocker and Autopilot pre-provisioning need a TPM.

  2. How can you practise Autopilot device preparation on a VM?

    Show answer

    Use a VM whose hardware hash is not registered and assign a device preparation policy to the user.

  3. What should you do with trial subscriptions after the exam?

    Show answer

    Cancel them before they convert, remove licences and delete the tenant or leave it with no paid subscriptions.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz