<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mark Orr - Yet Another Microsoft Intune Blog on Medium]]></title>
        <description><![CDATA[Stories by Mark Orr - Yet Another Microsoft Intune Blog on Medium]]></description>
        <link>https://medium.com/@markhunterorr?source=rss-f4c4977878b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JHyQv7xT4vEZ2_KX5LYwrQ.jpeg</url>
            <title>Stories by Mark Orr - Yet Another Microsoft Intune Blog on Medium</title>
            <link>https://medium.com/@markhunterorr?source=rss-f4c4977878b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:58:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@markhunterorr/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Access Packages On-Demand with PowerShell]]></title>
            <link>https://medium.com/@markhunterorr/access-packages-on-demand-assignment-from-powershell-3fdcfacd803e?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fdcfacd803e</guid>
            <category><![CDATA[microsoft-entra-id]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 07:59:23 GMT</pubDate>
            <atom:updated>2026-07-20T08:03:39.573Z</atom:updated>
            <content:encoded><![CDATA[<p>Entra ID Entitlement Management is great at what it’s designed for: self-service access requests, approval workflows, and time-bound access packages. But there’s a workflow it makes surprisingly tedious — the one where <strong>you already know who needs access and you just want to grant it right now.</strong></p><p>A user calls the service desk. You need to add them to the “Autopilot and Intune Enrollment” access package before they can enroll their device. In the portal that’s: open Identity Governance, find the catalog, find the package, open Assignments, New assignment, search the user, pick the policy, set a justification, set dates, submit. Multiply that by five users and it’s a lot of clicking for something that should take seconds.</p><p>So, I built <a href="https://access-packages.orr365.tech/#quickstart">[<strong>Access-Package-OnDemand</strong>]</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcl2MJQVYXXvpyB3_cHDqg.jpeg" /></figure><p>An interactive PowerShell module that turns that whole portal dance into one command:</p><pre>Start-AccessPackageOnDemand</pre><p><strong>What it Does</strong></p><p>Pre-register the access packages your team is allowed to manage. From then on, a single run walks you through:</p><p>1. <strong>Authenticate</strong> — a browser sign-in against Microsoft Graph (silent if you already have a token).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MT5Yg1v-U9zL8TU8NfyvA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mQ7W0mXF1GOPaxMXlelwGg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzwzmqJ0hK0YRMFmA097mw.jpeg" /></figure><p>2. <strong>Pick a package</strong> — auto-selected if you only manage one, otherwise a picker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBcIaRBukNY3DXerFdECLg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7khaOI973-2ByrwDGGAT3A.jpeg" /></figure><p>3. <strong>Enter emails</strong>— one address, or many separated by commas, spaces, or semicolons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8sJbePlNaF1UETZ13lIPw.jpeg" /></figure><p>4. <strong>Justify</strong> — choose from your saved business-justification options or type a custom reason.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxtUNzxsYF4QHq94cV8sxA.jpeg" /></figure><p>5. <strong>Confirm and assign</strong> — every selected user is submitted in one pass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBmno1x3i9MbsYetXnm3-w.jpeg" /></figure><p>The thing I care about most is the <strong>inline resolution</strong>. As you type emails, each one is checked against the directory <em>and</em> against the package’s existing assignments, then labeled before you commit anything:</p><p>→ ready to assign` (green)</p><p>→ already has access` (yellow)</p><p>→ not found` (red)</p><p>No more submitting a batch only to discover half of them were already assigned or mistyped.</p><p><strong>Getting Started</strong></p><p>You need PowerShell 7 and permission to manage the packages (a role like <em>*Identity Governance Administrator*</em>, or <em>*Catalog owner*</em> / <em>*Access Package Manager*</em> on the specific package).</p><p>Then:</p><pre># 1. Install from the PowerShell Gallery (pulls in the required Graph modules)<br>Install-Module -Name Access-Package-OnDemand -Scope CurrentUser<br><br># 2. Register the packages this tool should manage<br>Set-AccessPackageConfig<br><br># 3. Run it<br>Start-AccessPackageOnDemand</pre><p>Set-AccessPackageConfig asks for each package’s <strong>object ID</strong> (copy it from the portal:</p><p><em>Identity Governance → Entitlement management → Access packages → your package → copy the ID*</em>) and a friendly name for the picker. That’s saved to `%LOCALAPPDATA%\AccessPackageOnDemand\config.json`, so you only do it once.</p><p>A tool like this lives or dies on the small stuff. A few things I made sure to get right:</p><p><strong>Business Justifications, done once.</strong> Assignments require a justification, and typing the same reason every time is annoying. Set your team’s canned options once and pick a number at assignment time:</p><pre>Set-AccessPackageJustificationOptions -Options @(<br>  &#39;Autopilot and Intune Enrollments&#39;,<br>  &#39;Temporary incident response access&#39;,<br>  &#39;Contractor day-1 access&#39;<br>)</pre><p>There’s always a “<strong>Custom</strong>” option if none of them fit.</p><p><strong>Auto end-dates.</strong> No date prompts. The assignment end date is computed from the policy’s maximum duration automatically.</p><p><strong>Stuck-request recovery.</strong> If a previous attempt left a half-finished request open in the API — Entitlement Management sometimes does this — a naive retry just fails with <em>*”there is already an existing open request.”*</em> The module detects that, finds the blocking request, and offers to cancel it and retry, so you don’t have to go hunting in the portal.</p><p><strong>Cross-platform sign-in.</strong> Authentication is browser-based via MSAL, so it works on Windows, macOS, and Linux, with full Conditional Access enforcement. If your tenant targets a specific app registration with a CA policy, you can bring your own:</p><pre>Set-AppRegistrationConfig   # prompts for Client ID + optional Tenant ID</pre><p><strong>One thing worth knowing: delivery is asynchronous</strong></p><p>This tripped me up during testing, and it’s worth calling out because it’s a property of the platform, not the tool. When you submit an assignment, Entitlement Management doesn’t provision it synchronously — it <strong>queues</strong> the request and a backend job works it through `submitted → delivering → delivered`. In practice that can take <strong>three to six minutes</strong>, and the timing is entirely on Microsoft’s side.</p><p>So, after a successful batch, the module runs a short <strong>cooling-off countdown</strong> to let the assignment propagate, then automatically refreshes the assignments&#39; view. If a user still shows delivering, that’s expected — it hasn’t been picked up yet. You can hit refresh again a few minutes later. Trimming the number of resource roles in a package (and avoiding dynamic groups) is the only real lever you have on that delivery time.</p><p>If you want to see the outcome for yourself, the assignment shows up as <strong>Delivered</strong> in the Entra admin center once provisioning completes:</p><p><strong>The cmdlets</strong></p><p>Ten cmdlets cover the whole thing:</p><pre>| Cmdlet | What it does |<br>|--------|--------------|<br>| `Start-AccessPackageOnDemand` | Launch the interactive assignment flow |<br>| `Set-AccessPackageConfig` | Add / remove / replace managed packages |<br>| `Get-AccessPackageConfig` | List configured packages |<br>| `Clear-AccessPackageConfig` | Delete the saved configuration |<br>| `Set-AccessPackageJustificationOptions` | Set the canned justifications |<br>| `Get-AccessPackageJustificationOptions` | Show the effective justifications |<br>| `Clear-AccessPackageJustificationOptions` | Revert to defaults |<br>| `Set-AppRegistrationConfig` | Use a custom Entra app registration |<br>| `Get-AppRegistrationConfig` | Show the configured app registration |<br>| `Clear-AppRegistrationConfig` | Revert to the default public client |</pre><p><strong>Try it!</strong></p><p>The module is on the PowerShell Gallery, the source is on GitHub, and there’s a landing page with the full walkthrough:</p><p><a href="https://www.powershellgallery.com/packages/Access-Package-OnDemand/1.0.2">PowerShell Gallery</a></p><p><a href="https://access-packages.orr365.tech/#quickstart">Site</a></p><p><a href="https://github.com/markorr321/Access-Packages-on-Demand">GitHub</a></p><p>If you manage access packages and keep doing one-off assignments by hand, give it a run — I’d love to hear what would make it more useful.</p><p>Cheers 🍻, and until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fdcfacd803e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Giving Your IT Team a Simpler Way to Help: Microsoft Remote Help]]></title>
            <link>https://medium.com/@markhunterorr/giving-your-it-team-a-simpler-way-to-help-microsoft-remote-help-8c8ef03867a9?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c8ef03867a9</guid>
            <category><![CDATA[e7]]></category>
            <category><![CDATA[intune-suite]]></category>
            <category><![CDATA[tunein]]></category>
            <category><![CDATA[e5]]></category>
            <category><![CDATA[e3]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 07:49:18 GMT</pubDate>
            <atom:updated>2026-07-03T07:55:26.468Z</atom:updated>
            <content:encoded><![CDATA[<p>Every workplace has that moment. Someone’s laptop is acting up, they’re stuck, and they need a person from IT to actually see what’s on their screen and fix it. For years that meant a patchwork of different remote-control tools, extra logins, and a fair amount of crossed fingers about security.</p><p>Microsoft Remote Help is Microsoft’s answer to that problem. It’s a built-in Intune tool that lets your support team securely connect to a user’s Windows computer, see what they see, and help them out — all through the same Microsoft system your company already uses to manage its devices. No third-party apps to buy, no separate accounts to juggle, and everything is logged so there’s a clear record of who helped whom.</p><p>The nice part is what it means day to day. A technician signs in with their normal work account. The user gets a short security code to share, which confirms they’ve agreed to let someone in. From there the technician can view the screen or, with permission, take control to sort out the problem. Your organization decides who’s allowed to do what, so the right people have the right level of access and nothing more.</p><p>There’s incredible news on cost, too. Remote Help used to be a paid extra on top of your regular Microsoft licensing. As of July 1st 2026, Microsoft now includes it for companies with Microsoft 365 E3 or E5 plans at no additional charge — E3 customers get Remote Help along with some other management tools, and E5 customers get the entire Intune Suite that used to cost extra per person each month. For most organizations, that means the tool you’re reading about is likely already paid for.</p><p>Getting it set up is a one-time job for whoever manages your devices. The tool has to be turned on and pushed out to computers before anyone can use it, but once that’s done it just works quietly in the background, ready whenever someone needs a hand.</p><p>If you’re the person who has to actually roll this out, you don’t have to figure it out from scratch. <a href="https://www.linkedin.com/in/stevew25/">Steve Weiner</a> has a clear, step-by-step video that walks through the whole setup from start to finish:</p><p>How to Set Up Intune Remote Help (Step by Step)</p><p><a href="https://youtu.be/HkNBWrl08uI">https://youtu.be/HkNBWrl08uI</a></p><p>And everything you need to follow along — the installer and screenshots of each setup screen — is gathered in one place by me here:</p><p><a href="https://github.com/markorr321/Intune-Remote-Help">https://github.com/markorr321/Intune-Remote-Help</a></p><p>The bottom line: Remote Help takes something that used to be messy and makes it simple, secure, and native to the tools you already have. Your team spends less time wrestling with the how of getting connected, and more time actually helping people.</p><p>Cheers 🍻, and until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c8ef03867a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi Admin Approval (MAA) — A Missing Feature (Notifications)]]></title>
            <link>https://medium.com/@markhunterorr/multi-admin-approval-maa-a-missing-feature-notifications-4b9b5220e2ea?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b9b5220e2ea</guid>
            <category><![CDATA[tunein]]></category>
            <category><![CDATA[microsoft-intune]]></category>
            <category><![CDATA[microsoft-teams]]></category>
            <category><![CDATA[multi-admin-approval]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 06:16:01 GMT</pubDate>
            <atom:updated>2026-06-29T06:54:31.316Z</atom:updated>
            <content:encoded><![CDATA[<p>In <strong>May 2026</strong>, I had the opportunity to present at a <strong>Workplace Ninjas meetup in Dallas</strong>, where I covered a defense-in-depth approach to <strong>operational privileged identity management</strong> and <strong>Intune Multi Admin Approval (MAA)</strong>.</p><p>The session focused on how organizations can move beyond simply assigning privileged roles and start building a more resilient operational model around them. That means using layered controls such as least privilege, Privileged Identity Management, just-in-time elevation, strong authentication, approval workflows, auditing, and separation of duties.</p><p>A major part of the discussion centered on Intune MAA and why it matters in modern endpoint management. Intune is no longer just a device management platform; it is part of the administrative control plane. If an account with the right permissions is compromised, the attacker may be able to make high-impact changes across devices, policies, apps, scripts, and administrative roles.</p><p>That is why MAA is such an important control. It adds a second layer of human approval before protected Intune changes can take effect. When combined with Privileged Identity Management and a mature operational process, MAA helps reduce the risk of one compromised account or one mistaken action turning into a broader incident.</p><p>The goal of the presentation was simple: show how identity, endpoint management, and operational security all connect. Defense in depth is not one feature or one checkbox. It is a layered strategy that protects privileged access before, during, and after administrative actions occur. This presentation was inspired by the Stryker attack reported on March of 20226.</p><p>Based on public reporting: Stryker disclosed a March 11, 2026 cybersecurity incident that caused a global disruption to its Microsoft environment; CISA later warned organizations to harden endpoint management systems after malicious activity targeting those systems; and Microsoft’s current Intune MAA documentation specifically says MAA is meant to help protect against compromised administrative accounts by requiring a second admin approval before protected changes apply.</p><p>Read more about the attack here:</p><p><a href="https://www.cisa.gov/news-events/alerts/2026/03/18/cisa-urges-endpoint-management-system-hardening-after-cyberattack-against-us-organization?utm_source=chatgpt.com">CISA Urges Endpoint Management System Hardening After Cyberattack Against US Organization</a></p><p>The Stryker incident was not a traditional malware-driven ransomware event. It is best understood as a <strong>device wipe attack</strong> carried out through the Microsoft identity and endpoint management control plane. Instead of relying on malware to spread across endpoints, the attackers reportedly abused trusted administrative capabilities within the Microsoft environment to trigger device wipe actions at scale.</p><p>That distinction is important. In this type of attack, the endpoint management platform itself becomes the path of destruction. If an attacker compromises an account with enough Intune or Microsoft administrative privilege, they may be able to use legitimate management actions — such as wipe, retire, delete, or policy changes — against the organization.</p><p>One recommendation among several is to implement <strong>Multi Admin Approval (MAA)</strong>. Based on community feedback, I’m confident many organizations have already moved in that direction. My organization had MAA configured prior to the March 11 incident, so it was already part of our operational process rather than a reactive control added afterward.</p><p>Microsoft’s current list of Intune MAA protected resources includes <strong>Apps, Compliance policies, Configuration policies, Device actions, RBAC, Scripts, Tenant Configuration</strong>, and MAA access policies themselves are automatically protected. MAA is also now relevant to automation because Microsoft documents that app-authenticated Graph API calls can be intercepted when the target resource is protected.</p><p>If you do not have <strong>Multi Admin Approval (MAA)</strong> configured in Intune, now is the time to set it up.</p><p>MAA is one of the most practical controls Microsoft provides to help protect against compromised administrative accounts. It requires a second administrator to approve protected changes before Intune applies them. That means high-risk actions like device wipe, retire, delete, script deployment, app changes, RBAC changes, compliance policies, and configuration policy changes can be placed behind an approval workflow instead of relying on a single admin session.</p><p>In the context of a device wipe attack, this matters. If an attacker compromises an Intune administrator account, MAA can create a critical pause between the attempted action and the actual change. That second approval step may be the difference between a suspicious request being caught and a destructive action being executed across the environment.</p><p>This should not be treated as an optional “nice to have” control. If Intune manages your endpoints, then Intune is part of your security control plane. Protect it accordingly.</p><p>Microsoft provides official guidance for configuring MAA here: <a href="https://learn.microsoft.com/en-us/intune/fundamentals/role-based-access-control/multi-admin-approval"><strong>Use Multi Admin Approval in Intune</strong>.</a></p><p>Assuming Multi Admin Approval is already configured, the next challenge is operationalizing the approval process.</p><p>MAA gives Intune administrators an important approval gate, but there is still a noticeable gap around notification and workflow. Today, the process can still be very manual. A requester may submit an approval request, but approvers often need to know where to look, when to check, and what context matters before making a decision. Likewise, requesters may need to manually follow up with approvers through Teams, email, chat, or ticketing systems to make sure the request is seen and reviewed in a timely manner.</p><p>That creates a process gap. The control exists, but the communication around the control may not be fully automated. In a fast-moving operational environment, that can lead to delays, missed requests, approval fatigue, or out-of-band conversations where important context is lost.</p><p>This is where organizations need to mature beyond simply enabling MAA. They should define who approves which workloads, how approvers are notified, what justification is required, how emergency requests are handled, and how approvals are documented. Without that structure, MAA can become either a bottleneck or a rubber-stamp process.</p><p>The security value of MAA is strongest when the approval workflow is visible, repeatable, and auditable. Enabling the feature is step one. Building the notification, escalation, and communication process around it is what makes it operationally effective.</p><p>Microsoft Intune <strong>Multi Admin Approval (MAA)</strong> is one of the most important controls available for protecting high-risk administrative actions. It brings the four-eyes principle into endpoint management by requiring a second administrator to approve sensitive changes before they take effect.</p><p>That matters.</p><p>If an admin attempts to wipe a device, delete a policy, modify a settings catalog profile, deploy a script, or change another protected workload, MAA can stop that action from being applied until another approved administrator reviews it.</p><p>But there is a gap.</p><p>MAA creates the approval workflow, but it does not fully operationalize the communication around that workflow.</p><h3>The Problem Nobody Warns You About</h3><p>The biggest operational challenge with MAA is not the approval itself. It is awareness.</p><p>When an MAA request is created, Intune does not automatically notify the right people in the way most teams would expect. There is no native Teams notification. No automatic email to approvers. No obvious push that says, “Hey, something is waiting for review.”</p><p>The request simply sits in Intune until someone goes looking for it.</p><p>In a real enterprise environment, that creates friction. A requester submits a change and then has to manually chase someone down in Teams, email, or a ticketing system. The approver may not see the message right away. The request may sit for hours, or even a full day, before anyone notices it.</p><p>That is where a security control can become an operational bottleneck.</p><p>And when security controls become painful, people start looking for ways around them.</p><p>That is the exact opposite of what we want.</p><h3>MAA Is Valuable, But the Workflow Needs Help</h3><p>To be clear, this is not an argument against MAA. MAA is absolutely worth implementing. In fact, after seeing attacks that abuse endpoint management and identity control planes, I believe MAA should be treated as a baseline control for Intune environments.</p><p>But enabling MAA is only step one.</p><p>The next step is making sure the people responsible for approving requests actually know when a request exists.</p><p>That was the gap I wanted to close.</p><p>I wanted MAA to work the way an approval system should work. When a request is created, the right people should be notified where they already work. For most organizations, that place is Microsoft Teams.</p><h3>What I Built</h3><p>To solve this, I built a small Teams-based workflow around Intune MAA.</p><h3>GitHub</h3><p><a href="https://github.com/markorr321/intune-maa-notifier">GitHub Intune-MAA-Notifier</a></p><p><a href="https://youtu.be/78ssbVwgZi4"><strong>Live Demo</strong></a></p><p>The solution has two main parts.</p><p>The first part is a <strong>notifier</strong>. This is a PowerShell Azure Function that runs on a timer, checks Intune for pending MAA approval requests, and posts a Microsoft Teams Adaptive Card when it finds something new.</p><p>The second part is an <strong>approval bot</strong>. This is a Node.js Bot Framework function that handles the interaction from Teams. It allows the card to be updated, confirms the current state of the request from Intune, locks the card once the request is resolved, and notifies the original requester of the outcome.</p><p>The goal was not to replace Intune Tenant Administration blade.</p><p>The goal was to make MAA visible.</p><h3>Why Polling Was the Right Choice</h3><p>The obvious first thought was to use Microsoft Graph change notifications. Ideally, the system would subscribe to new MAA requests and react instantly when one appears.</p><p>The problem is that the Intune operationApprovalRequests resource does not support Graph change notification subscriptions.</p><p>So instead of forcing a real-time design where the platform does not support one, I used a timer-based polling model.</p><p>Every five minutes, the function checks Microsoft Graph for current approval requests. It filters for requests that still need approval, compares them against a small list of requests it has already announced, and posts a Teams card only for new items.</p><p>It is not flashy, but it works.</p><p>And for this type of workflow, five minutes is good enough. MAA approvals do not need a sub-second response time. They need visibility. A five-minute notification window is dramatically better than waiting for someone to randomly check the Intune portal.</p><p>Sometimes the boring design is the right design.</p><h3>Keeping the Design Simple</h3><p>The notifier keeps track of already-announced requests using a small JSON file in Azure Storage. There is no database. No queue. No complicated state engine.</p><p>It reads the existing list, compares it to what Graph returns, posts anything new, and writes the updated list back.</p><p>That simplicity matters. This kind of automation should be easy to understand, easy to troubleshoot, and easy to support. The point is to improve the operational workflow around MAA, not create another fragile system that requires constant care and feeding.</p><h3>Secretless by Design</h3><p>One of the most important design choices was to avoid stored secrets.</p><p>The Azure Function App uses a <strong>system-assigned managed identity</strong>. The bot app registration uses a <strong>federated identity credential</strong> that trusts that managed identity. At runtime, the function can request the tokens it needs without storing a client secret in application settings.</p><p>That removes an entire category of risk.</p><p>There is no secret to leak. No secret to rotate. No secret to accidentally commit. No calendar reminder to update a password before it expires.</p><p>For Azure-hosted automation, this should be the default pattern whenever the platform allows it.</p><h3>Acting as the Human, Not as a Backdoor</h3><p>The harder part was making sure the bot did not become a shortcut around the actual MAA control.</p><p>That was a key requirement.</p><p>The bot should not approve requests using some overpowered service principal. It should not become a hidden backdoor around separation of duties. The whole point of MAA is that a second authorized human must be involved.</p><p>The approval bot uses Teams SSO and delegated Graph tokens so that when an approver interacts with the card, the system reads the status as that user. The actual approve or reject action still happens in Intune or through the Intune-MAA workflow.</p><p>That means Intune remains the system of authority. The bot improves awareness and workflow, but it does not bypass the control.</p><h3>Designing Around Stale Cards</h3><p>One of the interesting lessons from this project was handling stale Teams cards.</p><p>In an approval workflow, the state can change somewhere else. Someone may approve or reject the request directly in Intune while the Teams card still shows available buttons.</p><p>Early in the project, this created an ugly experience. A user could click a button on a stale card and receive a raw Microsoft Graph error saying the action was no longer allowed because the request had already been handled.</p><p>Technically, that error was accurate.</p><p>Operationally, it was terrible.</p><p>No admin wants to see a wall of JSON when they click a button in Teams.</p><p>The fix was to redesign the behavior. Instead of allowing Teams to directly perform the approve or reject action, the buttons became confirm-only. The admin handles the request in Intune or the Intune-MAA module, then clicks the corresponding button in Teams to confirm the result and lock the card.</p><p>That made the workflow symmetrical and removed an entire class of errors.</p><p>The lesson was simple: graceful error handling is good, but designing the error out of the workflow is better.</p><h3>Closing the Loop With the Requester</h3><p>The final piece was notifying the requester.</p><p>When a request is approved or rejected, the original requester should not have to chase down the outcome. They should know what happened and why.</p><p>The bot sends the requester a private Teams message with the result. If the request was rejected, the message can include the approver’s reason. That turns MAA from a silent approval queue into a real workflow.</p><p>That small detail matters.</p><p>A requester who knows why something was rejected can fix the issue, adjust the change, or provide better justification next time. Without that feedback loop, MAA can feel like a black hole.</p><h3>The Bigger Point</h3><p>MAA is a strong control, but controls need operational support.</p><p>If approvers do not know something is waiting, the process slows down. If requesters do not know the result, they chase updates manually. If the only way to manage the queue is to remember to check the Intune portal, the process depends on human memory.</p><p>That is not a workflow.</p><p>That is a gap.</p><p>This project was built to close that gap by bringing MAA visibility into Microsoft Teams, where administrators are already working.</p><h3>What I Would Tell Other Teams</h3><p>If you are using Intune MAA, do not stop at enabling the feature. Think through the full operational process.</p><p>Who gets notified when a request is created?</p><p>Where do they see it?</p><p>How do they know what changed?</p><p>How does the requester know the outcome?</p><p>What happens when a request is rejected?</p><p>How do you avoid stale approvals and out-of-band confusion?</p><p>Those questions matter just as much as the technical configuration.</p><p>MAA gives you the approval gate. You still need a communication process around it.</p><h3>Final Thought</h3><p>Multi Admin Approval is one of the best controls Intune has for reducing the risk of single-admin compromise or accidental high-impact change. But without notification, visibility, and a clear workflow, even a good control can become frustrating.</p><p>That is why I built this.</p><p>Not to replace MAA.</p><p>Not to bypass Intune.</p><p>But to make the approval process visible, usable, and operationally sustainable.</p><p>Because a security control only works when people actually use it.</p><h3>The Shape of the Workflow</h3><p>At a high level, the workflow is simple.</p><p>A timer-based Azure Function checks Microsoft Graph every five minutes for pending Intune MAA requests. When it finds a new request, it posts an Adaptive Card into a Microsoft Teams channel so the approval team can see it.</p><p>From there, an administrator handles the request in Intune or through the Intune-MAA module. Once the request is approved or rejected, the Teams card can be confirmed and locked with the outcome. The original requester then receives a private Teams message with the result and, when available, the approver’s reason.</p><p>The flow looks like this:</p><pre>Timer Function → Graph: list pending MAA requests<br>               → Dedupe against known request IDs<br>               → Post Adaptive Card to Teams</pre><pre>Approver acts in Intune or Intune-MAA<br>               → Confirms outcome from Teams card<br>               → Card locks with approval/rejection receipt<br>               → Requester receives private Teams notification</pre><p>The goal is not to make Teams the source of authority. Intune remains the source of authority. Teams simply becomes the visibility and communication layer that MAA is missing.</p><h3>Deployment Model</h3><p>The notifier and bot are designed to be self-hosted.</p><p>Each organization deploys the solution into its own Azure subscription and tenant, using its own Function App, bot registration, managed identity, Teams channel, and Microsoft Graph permissions.</p><p>Nothing routes through a shared service.</p><p>That matters from a security and trust perspective. MAA is protecting sensitive administrative workflows, so the notification and bot layer should stay under the organization’s control. The automation should support the approval process without becoming another third-party dependency in the middle of privileged operations.</p><p>In other words, this is not meant to be a centralized service that sees everyone’s approval requests. It is meant to be tenant-owned automation that closes a real operational gap while keeping control where it belongs: inside your environment.</p><h3>Security Considerations</h3><p>Because this workflow touches Intune MAA, it needs to be treated as privileged automation.</p><p>The bot and notifier should only have the permissions they need to perform their jobs. The notifier needs enough access to read pending approval requests and post notifications. The bot needs to confirm request status and communicate the outcome, but it should not become a broad administrative service principal with unnecessary control over the tenant.</p><p>That distinction is important.</p><p>The purpose of this project is to improve visibility around MAA, not weaken the control MAA provides. The automation should support the approval process without bypassing Intune’s separation-of-duties model.</p><p>That is why the design keeps Intune as the source of authority. Approvals and rejections still happen in Intune or through the Intune-MAA workflow. Teams is used for awareness, confirmation, receipts, and requester communication.</p><h3>Why This Matters After Control-Plane Attacks</h3><p>The Stryker incident showed why endpoint management platforms need stronger operational controls. When attackers target the systems that manage endpoints, the management plane itself can become the attack path.</p><p>That is exactly why MAA matters.</p><p>But MAA is only effective if people actually see and act on the requests. A protected device wipe action sitting silently in a portal is better than no approval at all, but it still leaves a visibility gap. In a real incident, time matters. If a suspicious request is created, approvers need to know quickly so they can investigate, deny it, and escalate if needed.</p><p>This is the difference between having a control configured and having a control operationalized.</p><p>MAA provides the gate. Notification and workflow make the gate usable.</p><h3>Final Takeaway</h3><p>I built this because MAA solves an important security problem, but it leaves an operational gap.</p><p>The approval control exists. The notification workflow does not.</p><p>In a busy Intune environment, that gap matters. Admins should not have to remember to check the portal. Requesters should not have to chase approvals in side chats. Approvers should not have to guess what is pending or where to review it.</p><p>A good approval process should be visible, repeatable, and easy to follow.</p><p>This Teams bot turns Intune MAA from a silent approval queue into a real workflow. It brings requests into the place administrators already work, helps approvers see what needs attention, and closes the loop with the requester when the decision is made.</p><p>That is the kind of operational layer security controls need if we expect teams to actually use them.</p><h3>A Note: Proof of Concept and Deployment Guidance</h3><p>This project was created as an <strong>AI-assisted proof of concept</strong> to demonstrate how Microsoft Intune Multi Admin Approval notifications can be surfaced in Microsoft Teams. It is intended to show what is possible, close an operational visibility gap, and provide a starting point for organizations that want to build a more complete approval workflow around MAA.</p><p>This should not be deployed directly into production without review, validation, and testing.</p><p>Before implementing this solution, work closely with your <strong>IAM teams</strong>, <strong>Messaging/Teams administrators</strong>, <strong>Microsoft 365 administrators</strong>, <strong>Intune administrators</strong>, and <strong>security teams</strong>. The workflow touches privileged administrative processes, Microsoft Graph permissions, Teams bot registration, Azure Functions, managed identities, and Intune approval data. Those areas require proper ownership, review, and governance.</p><p>Organizations should first release this into a <strong>development or test environment</strong>, validate the permissions model, review the authentication flow, confirm Teams behavior, test requester and approver notifications, and perform extensive end-to-end testing before considering any broader rollout.</p><p>The intent of this tool is not to replace Microsoft Intunes current implementation, bypass Multi Admin Approval, or create an alternate approval path. Intune remains the source of authority. This solution is designed to improve visibility and communication around MAA requests by notifying the right people when action is needed.</p><p>Use this as a foundation, not a finished enterprise product. Review the code, adapt it to your organization’s standards, test thoroughly, and make sure the final implementation aligns with your internal security, identity, messaging, and change-management requirements.</p><p>Alright IT professionals, that wraps this one up.</p><p>MAA is a great control, but visibility is what makes it operational. Get it into Teams, test it in dev, work with the right teams, and make sure the process works before you trust it in production.</p><p>Cheers 🍻, and until next time keep securing the endpoint, protect the control plane, and I’ll see you in the next one.</p><p><strong><em>Note:</em></strong></p><p>If you are actively managing Intune Multi Admin Approval requests, I also built a companion tool called <strong>Intune-MAA</strong> to make the hands-on approval experience easier from PowerShell.</p><p>The Teams notification workflow helps solve the awareness problem, but <strong>Intune-MAA</strong> helps with the operational side of reviewing and managing approval requests directly.</p><p>You can check it out here:</p><p><a href="https://intune-maa.orr365.tech/">GitHub — Intune MAA</a></p><p><a href="https://intune-maa.orr365.tech/">Intune MAA — Multi Admin Approval Manager for PowerShell</a></p><p>If you are using MAA today, or planning to roll it out, give it a look. It was built for admins who want a faster, cleaner way to work through MAA approvals without living entirely in the portal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b9b5220e2ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Company Portal Install Failures and How to install Company Portal On Demand using Intune…]]></title>
            <link>https://medium.com/@markhunterorr/company-portal-install-failures-and-how-to-install-it-on-demand-using-intune-remediations-1cc03cb31d5d?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cc03cb31d5d</guid>
            <category><![CDATA[microsoft-intune]]></category>
            <category><![CDATA[company-portal]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 09:28:20 GMT</pubDate>
            <atom:updated>2026-06-07T09:29:41.474Z</atom:updated>
            <content:encoded><![CDATA[<h3>Company Portal Install Failures and How to install Company Portal On Demand using Intune Remediations</h3><p>Recently I have been hearing rumblings regarding Company Portal not installing during the ESP when previously it used to. A quick Google search reveals that this issue seems to occur more frequently than it ought to. Most recently something in the May 12th patch caused Company Portal to fail during the ESP.</p><p>Evidence of this issue can be seen here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*PkCiJoEvizuUO6lkehGVJA.png" /></figure><p>I am absolutely a root-cause kind of person. I believe in understanding the “why,” reviewing logs, and fixing the underlying issue instead of just treating the symptom.</p><p>That said, there are moments where the immediate priority has to be restoring functionality. When you have 90+ new hires starting and they are depending on Company Portal to install the applications required for their roles, time matters. For many of them, Company Portal is the only practical way to get those applications without creating a major operational burden.</p><p>In those situations, the first goal has to be getting users productive. Once the immediate impact is resolved and people can do their jobs, we can circle back, review the logs, identify the root cause, and wait for Microsoft to identify the issue and put a long-term fix in place.</p><p>Truly, when the Company Portal doesn’t install during the ESP in can be a bit of a pain in the a**. Over the years there have been a couple of solutions proposed to resolve this issue. One of those solutions was written by none other than <a href="http://linkedin.com/in/oliver-kieselbach">Oliver Kieselbach</a>. Oliver does great work and I have been following him over the years and have referenced his work over the years for a variety of reasons. In fact, while onboarding <a href="https://www.controlup.com/">ControlUp</a> into our environment I stumbled upon his Company Portal remediation as canned script. I chuckled a bit. To me this means that ControlUp has had enough customers complain about Company Portal install failures that they added Oliver’s script directly to their solution.</p><p>When testing Oliver’s script, I noticed that Company Portal installed almost immediately after triggering it via ControlUp. If you have followed along with my blog, you know I have had struggles with Company Portal myself and even referenced work by <a href="https://www.linkedin.com/in/rudyooms/">Rudy Ooms</a> where Rudy showed us how to have Company Portal open at first login. I must admit I have used Rudy’s solutions at a handful of clients who wanted Company Portal to launch on log in.</p><p>I started thinking about the different approaches. We had Oliver’s solution, and we had Rudy’s solution, but I kept asking myself whether there was a better way to handle a failed Company Portal install.</p><p>Specifically, could we remediate the issue in a way that gives both the end user and the technician confidence that the application is installing, without making them go hunt for confirmation?</p><p>That’s where I ended up taking this, and I think you’re going to like — or at least appreciate — the final result. Intune remediations to the rescue. Here is what I built.</p><p>Getting started. I take zero credit for how I discovered this truly I don’t. One of my seasoned desktops supports technicians came to me in early January of this year and chatted with me about a work around he had been using when Company Portal wasn’t installed on an end user&#39;s device in a break fix scenario. He would simply open a browser and navigate here:</p><p><a href="https://apps.microsoft.com/detail/9wzdncrfj3pz?hl=en-US&amp;gl=US">Company Portal — Free download and install on Windows | Microsoft Store</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikhE3sNJbmg6PbcZfbbHdg.png" /></figure><p>His approach was simple: use his admin rights to install the application on behalf of the end user.</p><p>Initially, that confused me because I thought Microsoft Store app installs were blocked in our environment. But that sent me down a bit of a rabbit hole. If you truly want to block the Microsoft Store, you really need to look at <a href="https://learn.microsoft.com/en-us/hololens/windows-defender-application-control-wdac">Windows Defender Application Control</a>.</p><p>Without WDAC, there are policy-based limitations to how much you can actually restrict Microsoft Store access. Once you understand those limitations, this workaround starts to make sense. It gives technicians a practical way to provide relief when Company Portal fails to install for… reasons.</p><p>Building the solution. When I bumped into Oliver’s solution I found this GitHub while reasearching:</p><p><a href="https://github.com/adotcoop/Intune/blob/master/Install-CompanyPortal.ps1">Intune/Install-CompanyPortal.ps1 at master · adotcoop/Intune</a></p><p>The one line in the comments really stuck out to me:</p><p>“The MDM Bridge provider appears to allow any store app to be installed automatically provided you know the applicationID.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*Bb1Cq94S1TAuGt7BrzH29w.png" /></figure><p>If I knew the applicationID I had something to work with, so I wrote a PowerShell script.</p><p><a href="https://github.com/markorr321/Company-Portal-Remediations/blob/main/Install-Company-Portal-On-Demand-Interactive.ps1">Company-Portal-Remediations/Install-Company-Portal-On-Demand-Interactive.ps1 at main · markorr321/Company-Portal-Remediations</a></p><p>What it does:</p><p>Because Intune executes remediations invisibly in the background, logging is the only way to see what happened on a given device. (With out parsing logs) The script creates a uniquely timestamped folder so repeated runs never overwrite each other, then routes everything through a small helper:</p><h3>1. Establishing a per-run audit trail</h3><pre>$timestamp = Get-Date -Format &quot;yyyyMMdd_HHmmss&quot;<br>$logFolder = &quot;C:\Temp\PAR-CompanyPortal_$timestamp&quot;<br>New-Item -Path $logFolder -ItemType Directory -Force | Out-Null<br>$logFile = Join-Path $logFolder &quot;CompanyPortal.log&quot;<br><br>function Write-Log {<br>    param([string]$Message)<br>    $entry = &quot;$(Get-Date -Format &#39;yyyy-MM-dd HH:mm:ss&#39;) - $Message&quot;<br>    Add-Content -Path $logFile -Value $entry<br>    Write-Output $Message<br>}</pre><p>Every Write-Log call lands in the file <strong>and</strong> the output stream — so you get both an on-device record and text Intune can surface in the portal.</p><h3>2. Checks detection before acting</h3><p>Even though this remediation only fires because Company Portal looked broken, the script verifies the package state itself before doing anything. This is what keeps it <strong>idempotent</strong> — if Company Portal is actually present, it does not work:</p><pre>$app = Get-AppxPackage -Name &quot;Microsoft.CompanyPortal&quot; -ErrorAction SilentlyContinue<br>if ($app) {<br>    Write-Log &quot;Company Portal is installed.&quot;<br>    exit 0<br>}</pre><h3>3. Re-installs when the package is missing</h3><p>This is the heart of the remediation. When detection comes back empty, the script pulls a fresh installer from Microsoft’s official URL, runs it, waits for it to finish, and records each step:</p><pre>else {<br>    Write-Log &quot;Company Portal not found. Installing...&quot;<br>    Invoke-WebRequest -Uri &quot;https://get.microsoft.com/installer/download/9WZDNCRFJ3PZ?hl=en-us&amp;gl=us&amp;referrer=storeforweb&quot; `<br>        -OutFile &quot;$env:TEMP\CompanyPortalInstaller.exe&quot;<br>    Write-Log &quot;Download complete. Starting installation...&quot;<br>    Start-Process &quot;$env:TEMP\CompanyPortalInstaller.exe&quot; -Wait<br>    Write-Log &quot;Installation process completed.&quot;<br>    exit 1<br>}</pre><h3>4. The exit codes speak Intune’s language</h3><p>The two exit values are what make this work as a remediation, not just a script. Intune reads them to report device state:</p><pre><br>$app = Get-AppxPackage -Name &quot;Microsoft.CompanyPortal&quot; -ErrorAction SilentlyContinue<br>if ($app) {<br>    Write-Output &quot;Company Portal present&quot;<br>    exit 0          # compliant — remediation does NOT run<br>} else {<br>    Write-Output &quot;Company Portal missing&quot;<br>    exit 1          # non-compliant — triggers the remediation script above<br>}</pre><p>The net effect is an Intune remediation for when a Company Portal install has failed, Intune’s detection flags the device, this remediation re-downloads and installs the app, logs every step, and reports back a clean 0/1 so your Remediations dashboard reflects which devices were already healthy versus which ones it had fail.</p><p>Now let&#39;s build it in Intune!</p><p><strong>Step 1</strong>: Navigate to: <a href="https://intune.microsoft.com/">https://intune.microsoft.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2OpDes239kCeCg3wb0_Fw.png" /></figure><p><strong>Step 2</strong>: Navigate to &gt; Devices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txUtnxrAlcbynFSzt63LEw.png" /></figure><p><strong>Step 3</strong>: Navigate to &gt; Scripts and Remediations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6M_ghGb8juAjyqrta2VWHQ.png" /></figure><p><strong>Step 4</strong>: Click “Create” under “Remediations”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOH6o2ZafTahvdU71adgog.png" /></figure><p><strong>Step 5</strong>: Give the script a name and description and click “Next”. <em>Hint use your favorite AI tool to help with the description it&#39;s a fun little shortcut…</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_lxqgrAIvBid-lJJpuE7w.png" /></figure><p><strong>Step 6</strong>: Now let&#39;s configure the script then click “Next”.</p><p>Detection Script File: <strong><em>Install-Company-Portal-On-Demand-Interactive.ps1</em></strong></p><p>Remediation Script File: <strong><em>Leave this blank</em></strong></p><p>Run this script using the logged-on credentials: <strong><em>Yes</em></strong></p><p>Enforce script signature check: <strong><em>(Follow your Environments Requirements)</em></strong></p><p>Run script in 64-bit PowerShell: <strong><em>Yes</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RWiUP3S_v7qebimoaPz9wg.png" /></figure><p><strong>Step 7</strong>: Set your scope tags and click “Next”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIEO89Riu_vKp8iPtwQ_Sw.png" /></figure><p><strong>Step 8</strong>: Submit your Multi Admin Approval or save…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uKwhs6ldflCfZWFHJQpjoQ.png" /></figure><p>Executing the script:</p><p><strong>Step 1</strong>: Navigate to &gt; Devices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uZCNwMTP9c4Lv-k5GZwJqg.png" /></figure><p><strong>Step 2</strong>: Navigate to &gt; Windows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5l8sFb7mllFDSJ7imfgUw.png" /></figure><p><strong>Step 3</strong>: Navigate to the device</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkHvfiPXSynF1QR5sYnETw.png" /></figure><p><strong>Step 4</strong>: Now in the right-hand corner of the device view click the three little dots […]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uUnX0zPAWIxGpn77hx4Kkg.png" /></figure><p><strong>Step 5</strong>: Next “Click” on “Run remediation (preview)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIVpn4Xapjxv8APAQ8PZqw.png" /></figure><p><strong>Step 6</strong>: Search for the newly created script. “Select” and “Click” on “Run Remediation”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrjFHCyiHuhTvtTC1GO0sA.png" /></figure><p><strong>The solution in action</strong>:</p><p><a href="https://youtu.be/mfMzhr7U12M">https://youtu.be/mfMzhr7U12M</a></p><p>That is all for now!</p><p>Until next time, IT professionals — cheers! 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cc03cb31d5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Super Charging your Autopilot Testing with HyperPilot, Autopilot Import GUI and a PowerShell TUI!]]></title>
            <link>https://medium.com/@markhunterorr/super-charging-your-autopilot-testing-with-hyperpilot-autopilot-import-gui-and-a-powershell-tui-af44c7ed1bee?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/af44c7ed1bee</guid>
            <category><![CDATA[hyperpilot]]></category>
            <category><![CDATA[autopilot]]></category>
            <category><![CDATA[tunein]]></category>
            <category><![CDATA[mdm]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 16:39:42 GMT</pubDate>
            <atom:updated>2026-03-04T17:12:04.053Z</atom:updated>
            <content:encoded><![CDATA[<p>Everyone has to do device testing any time they change enrollment configurations — whether it’s an Autopilot deployment profile, the Enrollment Status Page, a new app, or a device configuration policy. We’ve all been there.</p><p>You go grab a device.</p><p>You capture the serial number.</p><p>Then you start the “where is it?” checklist:</p><ul><li>Is the device in Autopilot?</li><li>Is it in Intune?</li><li>Is it in one but not the other?</li><li>Is it in both, but in a weird state?</li><li>Is it a net new enrollment?</li></ul><p>So you delete it from Intune, wipe it, and re-enroll it. Sound familiar?</p><p>The real question becomes: how fast can you turn that around?</p><p>Do you use an <em>autounattend.xml</em> or go manual?</p><p>Are you capturing the hardware hash and importing via CSV?</p><p>Are you using <strong>Get-WindowsAutopilotInfo</strong> (Community) to speed things up?</p><p><a href="https://www.powershellgallery.com/packages/get-windowsautopilotinfocommunity/5.0.13">PowerShell Gallery | get-windowsautopilotinfocommunity 5.0.13</a></p><p>No matter which approach you take, iterative testing can be slow — and painfully repetitive — especially when you’re doing it over and over for small changes.</p><p>And it usually starts capturing the device has and for me typing out the same set of PowerShell commands again… and again:</p><pre>set-executionpolicy bypass -force<br><br>Install-Script -Name Get-WindowsAutoPilotInfoCommunity<br><br>Get-WindowsAutoPilotInfoCommunity.ps1 -GroupTag &quot;YourGroupTagHere&quot; -Online<br><br></pre><p>Physical device testing can be incredibly repetitive — and those test cycles can drag on. That’s why I want to share how I test, and the tools I use every day to do rapid Intune enrollment testing for Autopilot devices <strong>without</strong> needing physical hardware.</p><p>I’ll cover three tools I rely on.</p><ol><li><a href="https://hyperpilot.getrubix.com/">HyperPilot</a></li><li><a href="https://ugurkoc.de/autopilot-import-gui/">Autopilot Import GUI</a></li><li><a href="https://github.com/markorr321/HyperPilot-Helper-s-">HyperPilotHelper</a></li></ol><p>First let&#39;s talk about HyperPilot. HyperPilot was created by <a href="https://www.linkedin.com/in/stevew25/">Steven Weiner </a>the founder of <a href="https://getrubix.com/">Get Rubix | Microsoft Cloud Experts &amp; YouTube Creators</a>.</p><p>What HyperPilot does is phenomenal for my workflow.</p><p>HyperPilot is a desktop application that streamlines creating <strong>Hyper-V virtual machines</strong> for testing <strong>Microsoft Intune</strong> and <strong>Autopilot</strong> enrollment scenarios.</p><p><strong>Key features:</strong></p><ul><li><strong>3-step VM creation</strong> — Automates the entire Hyper-V VM setup process (no manual Hyper-V Manager navigation needed)</li><li><strong>Multiple Windows versions</strong> — Supports Windows 11 22H2, 23H2, and 24H2 as base images, downloaded and cached locally for rapid cloning</li><li><strong>Autopilot v2 (Device Preparation) integration</strong> — Automatically registers created VMs as corporate identifiers in your Intune tenant, so they’re ready for APv2 enrollment</li><li><strong>Entra ID authentication</strong> — Connects directly to your M365 tenant with cached credentials (if configured)</li><li><strong>Configurable hardware</strong> — Customize CPU cores, RAM, and TPM settings (defaults: 4 cores, 8GB RAM)</li></ul><p><strong>How it works:</strong></p><p>A setup wizard downloads a base Windows image and stores it locally. From there, you pick a prefix, Windows version, and hardware config — and HyperPilot creates the VM, registers it in Intune’s corporate identifiers, and it shows up ready to go in Hyper-V Manager.</p><p><a href="https://www.linkedin.com/in/joery/">Joery Van den Bosch</a> does a fantastic write up about it here:</p><p><a href="https://intunestuff.com/2025/06/24/hyperpilot/">HyperPilot: Effortless Device Prep in 3 Steps</a></p><p>If you’re focused on Autopilot and Intune testing (like I am) and you’re <strong>not</strong> using <strong>HyperPilot</strong>, I strongly recommend you check it out. Seriously — pause here and go look at it. Subscribe or grab a license. There’s even a <strong>30-day trial</strong>, so you can try it without committing. Long story short: get it installed on your machine.</p><p>If you’re already using HyperPilot (and I’m guessing many of you are), stick with me.</p><p><strong><em>Note: This demo is Autopilot v1 focused. Who use v2 in production anyway!?! I’ll digress.</em></strong></p><p>One of the best parts is that Steve has graciously bundled several PowerShell modules directly into HyperPilot. That means you don’t have to install anything extra — including <a href="https://www.linkedin.com/in/andrew-taylor-41707916/">Andrew Taylor</a> <strong>Get-WindowsAutopilotInfo (Community)</strong> module. You can just launch HyperPilot, run the commands you need, and you’re off to the races.</p><p><strong><em>Quick callout: This is fantastic work and a genuinely solid use case. I love it.</em></strong></p><p>But… I eventually got tired of typing the same commands over and over — and honestly, remembering them all? Forget about it.</p><p>So I started asking myself: <strong>How can I automate this even further — so anyone can do it without needing to memorize a bunch of commands?</strong></p><p>Enter: <strong>Autopilot Import GUI</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*uts0uCot9jrW-JdZ-5CQug.png" /></figure><p>Autopilot Import GUI is a tool by <a href="https://www.linkedin.com/in/ugurkocde/">Ugur Koc</a> that simplifies the Windows Autopilot device provisioning workflow. Its main purpose is to provide a user-friendly interface for tasks that are usually handled through the command line or scripts.</p><p><strong>Key features:</strong></p><ul><li><strong>Import device hardware hashes</strong> into Windows Autopilot via a graphical interface (instead of manually running PowerShell scripts)</li><li><strong>Install Windows Updates</strong> before starting the Autopilot process, ensuring devices are up-to-date prior to enrollment</li><li><strong>Export hardware hashes to USB</strong> — useful for scenarios where you need to collect hashes from devices that aren’t yet connected to the network</li></ul><p>It’s aimed at IT admins managing device provisioning in a <strong>Modern Workplace / Intune</strong> environment, making the Autopilot onboarding process more accessible and less error prone.</p><p>Ugur does a great write up here:</p><p><a href="https://ugurkoc.de/autopilot-import-gui/">Autopilot Import GUI — Ugur Koc</a></p><p>You might be wondering at this point what I’m even getting at — or, more pragmatically, if I’m crazy. The short answer is: yes… but not because of this. Stick with me.</p><p>I want to share my testing workflow with you.</p><p>For this walkthrough, let’s assume you already have <strong>HyperPilot</strong> installed and configured and you’re focuse on Autopilot v1 enrollments.</p><p>Step 1: Launch HyperPilot</p><p>Step 2: “Create a New VM”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*jMb9RaMZMyh9KAdNRJPRYA.png" /></figure><p>Step 3: Enter your VM Name Prefix and click “Next”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*68F2skJ5EOB6nY2Izaevzg.png" /></figure><p>Step 4: Choose your Windows Version and click “Next”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*fqwMcK0CKTG83iNr6HWBuQ.png" /></figure><p>Step 5: Skip Autopilot Device Preparation by simly clicking “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*RfREUAuzEfJdgRU8DnfU2w.png" /></figure><p>Step 6: Select the CPU Cores and RAM and click “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*FD2hRUJKU8q2AjVGn8bcCA.png" /></figure><p>Step 7: Verify VM Information and click “Create VM”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*rUDkWIFi93cGcL69n_D3Rg.png" /></figure><p>Step 8: Now your VM is being created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*l29sZ9oO3j4pDbPF67L1CQ.png" /></figure><p>Step 9: Now your VM is created.</p><p>Traditionally, we’d open <strong>Hyper-V Manager</strong>, boot the VM, and then run the prerequisite PowerShell commands to get the device into Autopilot. You already know the drill:</p><pre>set-executionpolicy bypass -force<br><br>Get-WindowsAutoPilotInfoCommunity.ps1 -GroupTag &quot;YourGroupTagHere&quot; -Online</pre><p>The same set of commands most Intune admins have typed so many times they could recite them in their sleep — those commands.</p><p>I love them. I use them. I depend on them. But for this workflow demo, we’re not going to use them.</p><p>Instead, we’re going to use a PowerShell script I built to supplement HyperPilot.</p><p>Insert:</p><p><a href="https://github.com/markorr321/HyperPilot-Helper-s-">HyperPilot Helper</a></p><p>HyperPilot Helper is a <strong>PowerShell-based companion toolset</strong> that automates VM lifecycle management for Windows Autopilot deployments. It fills the gaps between HyperPilot’s VM creation and actual Autopilot enrollment by handling preparation and cleanup tasks all while leveraging Autopilot Import GUI.</p><p><strong>Key features:</strong></p><ul><li><strong>Autopilot-Prep mode:</strong></li><li>Configures VM networking (auto-creates a virtual switch or falls back to alternatives)</li><li>Enables Enhanced Session Mode and guest services for clipboard support</li><li>Starts VMs, monitors for heartbeat, and transfers the Autopilot setup script (API.bat) into the VM</li><li>Auto-opens the VM console via vmconnect.exe</li><li><strong>VM-Cleanup mode:</strong></li><li>Scans folders for VHD/VHDX disk files</li><li>Gracefully shuts down running VMs (with timeout-based hard-stop fallback)</li><li>Removes VMs from Hyper-V and deletes associated storage</li><li>Includes a <strong>dry-run</strong> preview for safe validation before deleting anything</li><li><strong>API.bat</strong> — Bootstraps Autopilot enrollment by installing <strong>Autopilot_Import_GUI</strong> (Ugur Koc’s tool) to simplify device registration with Group Tag support</li></ul><p><strong>How it works:</strong></p><p>The toolset has four components: a combined script (HyperPilot.ps1), two standalone scripts (one per mode), and API.bat. All operations are logged with timestamps for auditing. Scripts auto-elevate to admin and auto-upgrade PowerShell if needed.</p><p><strong>Requirements:</strong> Windows with Hyper-V, PowerShell 7+, admin access, and internet connectivity.</p><p>Back to testing!</p><p>HyperPilot Helper in action:</p><p>Step 1: Clone the repo and launch PowerShell 7</p><p>Step 2: Navigate to the directory where you cloned the repo and run HyperPilot.ps1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpaZT8Nwws9C6HLYnKTn3A.png" /></figure><p>Step 3: Select option 1 “Autopilot-Prep”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W_TmshfhFpgytuQE_EgY0Q.png" /></figure><p>Step 4: Select the newly created VM that you deployed from the selection options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vRpsFWYiMn18OaiAgLdUqw.png" /></figure><p>Step 5: Now the script will:</p><p>Locate the device.</p><p>Ensure it is connected to your switch for internet connectivity.</p><p>Enable Clipboard for easy copy and paste usage when collecting logs.</p><p>Start the VM</p><p>Copy API.bat to configure AutopilotImportGUI</p><p>Connect to the VM and launch it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08NmtUNJ4ot5OfIF2w5yjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cvEIflQ0jC8rGDKeb8ZJTQ.png" /></figure><p>Step 6: Now on the VM. Press Shift + F10 to launch a command window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOHGwvIvDqGcf78LYaF60g.png" /></figure><p>Step 7: Navigate to the root of C by typing Cd \ and then Enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YikTvuFawGqiCrWaLrRjUQ.png" /></figure><p>Step 8: Type api.bat and then enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kkyYXZI-HFeOYhuOAJca3g.png" /></figure><p>Step 9: The bat file will run and launch the Autopilot Import GUI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SU-ter3Y2oSHFkBU_Up98g.png" /></figure><p>Step 10: Enter your Group Tag and click “Save Group Tag”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HAWY9GUVp79ob3xre5zxrQ.png" /></figure><p>Step 11: Now that the Group Tag is saved click “Login and register device in Autopilot”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7CjLIVoJ7nkFooURU_pMw.png" /></figure><p>Step 12: Install Get-WindowsAutopilitImport will install and you will be prompted to enter your enrollment account. Enter it and click “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjLXORKsT9vfWPV78ENH0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aogbd8lleGBxZ-8pIpDUWA.png" /></figure><p>Step 13: The device will begin to import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*126AIT5BK5KR6Liw1_ZX7Q.png" /></figure><p>Step 14: The device profile will begin assignment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*0vF1bBTNCfJpU8-9mUxTxw.png" /></figure><p>Step 15: Once assignment has completed the device will reboot automatically without interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*uOvkMLiMm2rVBltTe5EpWQ.png" /></figure><p>Step 16: On reboot the device will update and land on the well-known “Let’s set things up for your work or school” page. Enter the email of your test user and click “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*mtpgEt_FckKpRXM72XYZwg.png" /></figure><p>Step 17: Your device with then enter the enrollment phase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*2YSceBm_sOeo5uc1Fyp8jQ.png" /></figure><p>Once you have completed testing on the VM and the enrollment process you may want to clean up the deployment and remove the VM and its components from your local machine for subsequent testing.</p><p>Back to PowerShell:</p><p>In the same directory you called HyperPilot.ps1 previously call it once again.</p><p>This time we will select VM-Cleanup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fda4cW5I6phl3CpdasN5A.png" /></figure><p>Next select the VM to remove. For my demo I will select option 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-Rn48rXnERIoBSpoqlHrA.png" /></figure><p>You will then be prompted to “press Enter to confirm” to shut down the VM. Press enter.</p><p>The VM will then powered down and you get a nice little progress indicator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_j-eT--2qNEMEl996hynQ.png" /></figure><p>Once it is shut down. You will be prompted to “Remove the VM from Hyper V” (press Enter to confirm) press enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vJNuBkRHwCTekIulCXr2Sw.png" /></figure><p>After pressing enter you will be prompted to delete the associated VHDX file. Again (press Enter to confirm).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2UtUFlEYRXjDqgrhPlXK3A.png" /></figure><p>Upon hitting enter you are given the indication that the VHDX has been deleted and “Cleanup is complete”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pKmR4ilGL-Oc0pefc9Bq_A.png" /></figure><p>So, if you’ve followed along this far, you now have a clean, repeatable process for testing Autopilot v1 enrollments — without:</p><ul><li>A physical device</li><li>Having to remember a bunch of complex PowerShell commands</li><li>The overhead of clicking through GUIs to launch VMs and clean up leftovers from prior tests</li></ul><p>Instead, you get a streamlined workflow: a clean GUI experience with <strong>HyperPilot</strong> and <strong>Autopilot Import GUI</strong>, plus a terminal-driven experience with <strong>HyperPilot Helper</strong>.</p><p>Now it’s time to rinse and repeat — testing again and again, rapidly, supercharged by three community tools and your willingness to iterate.</p><p>If you don’t know now you know. Check out any or all of these tools. Bang them against a wall and test. I’m always open to feedback with a willingness to fix bugs and solve problems. Ping me. Send a Teams message or smoke signal. I’m here to help.</p><p>Until next time, IT professionals — cheers! 🍻</p><p>Credit to:</p><p><a href="https://www.linkedin.com/in/stevew25/">Steven Weiner</a><br><a href="https://www.linkedin.com/in/ugurkocde/">Ugur Koc</a><br><a href="https://www.linkedin.com/in/andrew-taylor-41707916/">Andrew Taylor</a></p><p><strong>Connect with me:</strong></p><ul><li><a href="https://www.linkedin.com/in/markorr321/">LinkedIn</a></li><li><a href="https://x.com/MarkHunterOrr">Twitter/X</a></li><li><a href="https://medium.com/@markhunterorr">Medium</a></li><li><a href="/service/mailto:markorr321@gmail.com">Email</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af44c7ed1bee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving Onboarding Experience: Automatically Launch the Company Portal a Win32 application!]]></title>
            <link>https://medium.com/@markhunterorr/improving-onboarding-experience-automatically-launch-the-company-portal-a-win32-application-f04f9f262855?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f04f9f262855</guid>
            <category><![CDATA[win32]]></category>
            <category><![CDATA[tunein]]></category>
            <category><![CDATA[powershell]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 12:43:54 GMT</pubDate>
            <atom:updated>2026-02-22T13:27:47.779Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a part two from my original post:</p><p>Improving Onboarding Experience: The Company Portal a Discovery!</p><p><a href="https://medium.com/@markhunterorr/improving-onboarding-experience-the-company-portal-discovery-746fc9a2a91b">Improving Onboarding Experience: The Company Portal a Discovery | by Mark Orr — Yet Another Microsoft Intune Blog | Feb, 2026 | Medium</a></p><p>In my previous blog post, I highlighted work published by Rudy Ooms that shows how to deploy the Company Portal as a <strong>Line-of-Business (LOB)</strong> app in <strong>device context</strong>, then pair it with a couple of platform scripts to ensure Company Portal is available for end users at <strong>first sign-in</strong>.</p><p>If you’ve been following along, you already know the situation with the <strong>Microsoft Store (new)</strong> version of Company Portal in Intune: its install behavior can be unreliable. During <strong>Autopilot enrollment</strong>, the app is often <strong>missing at the user’s first login</strong>, even when everything else appears to complete normally.</p><p>Because of that, many organizations (mine included) have taken the pragmatic route: deploy Company Portal as a <strong>post-ESP app</strong> and accept that it’ll show up <em>eventually</em>. As long as it lands on the device at some point, users can still enroll and get moving.</p><p>But after months of enrollments, my team decided “eventually” wasn’t good enough — we wanted Company Portal available <strong>sooner</strong>, ideally <strong>immediately after first login</strong>. So when I found Rudy’s post, I was excited and went straight to testing it in my lab.</p><p>And during that testing, I noticed a couple of things: I had failed enrollments. Including the LOB with our current blocking application seemed to be idiopathic and cause enrollment failures. Take the LOB out of the ESP and re-enroll and the device completed enrollment successfully.</p><p>After all Rudy does call this out in his blog:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/0*9ywTIgpijBL5-far.png" /></figure><p>I’ll be honest — I’ve been burned by this before.</p><p>Early in my Intune/Autopilot journey, I arrogantly assumed I had it all figured out. In reality, I didn’t know nearly as much as I thought I did. I mixed <strong>LOB</strong> and <strong>Win32</strong> applications in a production ESP and ended up putting my organization into a <strong>Priority 1</strong> support case with Microsoft. Device enrollment basically stopped. No one could enroll, and I couldn’t immediately explain why.</p><p>This was back in <strong>2021</strong>, and while guidance exists today, the “don’t mix Win32 and LOB in ESP” best practice wasn’t as clearly documented then. Either way, after seven long days (and too many late nights), I finally resolved it by removing the LOB app from ESP. Microsoft gave me a very direct warning: <strong>don’t do that again</strong>. Their guidance at the time was clear — <strong>don’t mix and match</strong>. I took that lesson seriously and never looked back.</p><p>Until I found Rudy’s blog.</p><p>Rudy’s approach was compelling enough that I decided to test it anyway. Unfortunately, my results looked a lot like 2021: I could get it working in non-prod, but once I moved the same approach into production, <strong>ESP failures</strong> followed.</p><p>That should’ve been the end of the investigation — but I wanted to dig deeper.</p><p>One thing I noticed was especially confusing: even when the LOB deployment looked successful, a day or two later Intune would start reporting the app as <strong>failed</strong>. It took me longer than I’d like to admit to connect the dots, but the root cause was straightforward:</p><p>When you deploy an <strong>APPX/MSIX as a LOB app in Intune</strong>, you’re stuck with a <strong>static detection mechanism</strong> — there’s no real customization. If the app later <strong>auto-updates</strong>, the installed version no longer matches what Intune expects, and detection can flip to “not installed” or “failed,” even though the app is actually present.</p><p>So in my environment, deploying Company Portal as a LOB app just wasn’t consistent or reliable enough to trust — especially in production.</p><p>And to be fair, even Rudy calls this out and recommends converting the MSI to a <strong>Win32</strong> app (or using a custom app approach — especially if you’re using <strong>Patch My PC</strong>) for a more predictable experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbYmZDHuY6jQqHjjBYemBg.png" /></figure><p>Earlier this week, I set out to do exactly that. It sounded simple enough, right? Wrap Company Portal as a Win32 app, deploy it, call it a day — problem solved, blog finished.</p><p>Not so fast.</p><p>Packaging and deploying it as a Win32 app was actually the easy part.</p><h3>Configuring the Solution</h3><p><strong>1. Download the offline Company Portal package</strong> Download and extract the Company Portal bundle, license, and framework dependencies from Microsoft. <a href="https://github.com/markorr321/MCP/blob/main/Company-Portal-Dependancies/Company-Portal-Dependencies.md">Company-Portal-Dependencies.md</a></p><p><strong>2. Package and deploy the Win32 app in Intune</strong> Wrap the Win32/ folder into an .intunewin file using the Microsoft Win32 Content Prep Tool, then upload the package to Intune. Configure the install/uninstall commands, upload the app logo, set the custom detection script, and assign to your device group as Required. <a href="https://github.com/markorr321/MCP/blob/main/Win32/Win32-App.md">Win32-App.md</a></p><p><strong>3. Deploy the Platform Script in Intune</strong> Create the Platform Script, upload CreateScheduledTask.ps1, and assign to the same device group. <a href="https://github.com/markorr321/MCP/blob/main/PlatformScript/Platform-Script-Scheduled-Task.md">Platform-Script-Scheduled-Task.md</a></p><p>The full solution is open-source and available on GitHub — including all scripts, offline dependencies, and step-by-step Intune configuration guides for both the Win32 app and Platform Script.</p><p><a href="https://github.com/markorr321/CompanyPortal-Win32-Deploy">github.com/markorr321/CompanyPortal-Win32-Deploy</a></p><h3><strong>The AppX Gap: Why Provisioning Isn’t Registration</strong></h3><p>If you’ve ever tried deploying the Microsoft Company Portal as an offline Win32 app through Intune, you’ve probably run into a frustrating problem: the app installs successfully, but the first user to log in can’t see it. To understand why, you need to understand how Windows handles AppX packages and the critical difference between provisioning and registration.</p><p>Windows has two distinct commands for installing AppX packages, and they operate at completely different levels.</p><p><strong>Add-AppxProvisionedPackage</strong> is a machine-level operation. It stages an app package into the Windows image so that the OS knows to install it for every new user profile that gets created on that device. The key phrase here is <em>new user profiles</em> — profiles created <strong>after</strong> the package is provisioned.</p><p><strong>Add-AppxPackage</strong> is a user-level operation. It registers a package directly into a specific user&#39;s profile, making the app appear in their Start Menu and app list. This must run in the context of the user&#39;s own session.</p><p>In testing I experienced exactly this. The applications installed successfully during the ESP but was not visible in the graphical user interface or Windows Start menu. After lots and lots of test I discovered why.</p><h3>The Autopilot Timing Problem</h3><p>During an Autopilot enrollment, these events happen roughly in this order:</p><ol><li>The device enrolls into Intune</li><li>The user signs in and their <strong>profile is created</strong></li><li>ESP (Enrollment Status Page) processes policies and app installs</li><li>The Win32 app installs and calls Add-AppxProvisionedPackage</li><li>The user lands on the desktop</li></ol><p>The problem is in steps 2 and 4. The user’s profile is created <strong>before</strong> the package is provisioned. Since Add-AppxProvisionedPackage only auto-registers for profiles created <em>after</em> it runs, it completely misses the user that&#39;s already sitting at the desktop. Windows provisioned the app to the machine, but never registered it into the existing user&#39;s profile.</p><p>The result: the app is on the device, but the user can’t see it.</p><p>Throughout testing I found one reoccurring pattern. Even though the application was a blocking application in the ESP it would then reprocess and install as a post ESP application and instantly became visible in the Windows Start menu. So that leaves us with a question:</p><h3>Why Not Just Register During Install?</h3><p>You might think — why not call Add-AppxPackage -Register in the install script to cover existing users? The problem is that the Win32 app install runs as <strong>SYSTEM</strong>. While you can attempt to register the manifest from SYSTEM context, it doesn&#39;t reliably stick for the currently logged-in user. The timing and session state during ESP make this unpredictable at best.</p><h3>A Note on Registration During ESP</h3><p>Throughout testing, I noticed that calling Add-AppxPackage -Register after a successful Add-AppxProvisionedPackage during ESP — and then again in a new user session — did result in Company Portal appearing in the Start Menu. The -Register approach works by pointing to the AppxManifest.xml of the already-provisioned package in WindowsApps, which is lightweight since the package is already on disk.</p><p>However, this only worked reliably when the timing lined up perfectly: the provisioning had to complete before the user profile was fully initialized, and the registration call had to execute while ESP was still holding the session. In real-world deployments, that timing isn’t guaranteed. ESP may skip account setup, the Win32 app may install after the user is already on the desktop, or the registration call may fire before the provisioned package is fully staged.</p><p>Early in testing, I found that calling Add-AppxPackage in user context with just the .appxbundle would fail on x64 machines — Windows couldn&#39;t resolve the framework dependencies on its own. Unlike Add-AppxProvisionedPackage which runs as SYSTEM and has access to the provisioning store, Add-AppxPackage in a user session expects the dependencies to be explicitly provided via -DependencyPath.</p><p>The solution was to have the Win32 app’s Install.ps1 stage the .appxbundle and all .appx framework dependencies to C:\ProgramData\CompanyPortal during install. This directory is readable by all users but writable only by administrators, making it a natural fit.</p><pre># Stage appxbundle and dependencies for user-context registration<br>$stagingDir = &quot;C:\ProgramData\CompanyPortal&quot;<br>if (!(Test-Path $stagingDir)) {<br>    mkdir $stagingDir | Out-Null<br>}<br><br>Write-Host &quot;Staging appxbundle and dependencies to $stagingDir...&quot;<br>Copy-Item -Path $bundlePath -Destination $stagingDir -Force<br>foreach ($depPath in $depPaths) {<br>    Copy-Item -Path $depPath -Destination $stagingDir -Force<br>}<br>Write-Host &quot;Staged files: $((Get-ChildItem $stagingDir).Count)&quot;</pre><p>In testing I built a registration that script picked up the bundle and dependencies from the staging directory and passed them all to Add-AppxPackage — no dependency resolution issues, no reliance on the provisioning store, and no elevated permissions needed.</p><pre>#RegisterCompanyPortal.ps1<br>$pkg = Get-AppxPackage -Name &quot;Microsoft.CompanyPortal&quot; -ErrorAction SilentlyContinue<br>if (-not $pkg) {<br>    $stagingDir = &quot;C:\ProgramData\CompanyPortal&quot;<br>    $bundle = Get-ChildItem &quot;$stagingDir\*.appxbundle&quot; -ErrorAction SilentlyContinue | Select-Object -First 1<br>    if ($bundle) {<br>        $deps = Get-ChildItem &quot;$stagingDir\*.appx&quot; -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName<br>        if ($deps) {<br>            Add-AppxPackage -Path $bundle.FullName -DependencyPath $deps -ErrorAction SilentlyContinue<br>        } else {<br>            Add-AppxPackage -Path $bundle.FullName -ErrorAction SilentlyContinue<br>        }<br>    }<br>}</pre><p>What it does:</p><p>Checks if Company Portal is already installed for the current user. If not, grabs the staged bundle and dependencies from C:\ProgramData\CompanyPortal and installs them via Add-AppxPackage.</p><p>Now that I had that working, I had to figure out a way to get this process to kick off programmatically. I had an ah ha moment when I remembered <a href="https://www.linkedin.com/in/andrew-taylor-41707916/">Andrew Taylor</a> solution that backs up user&#39;s profile data automatically utilizing a scheduled task. I use this often during Intune builds, but I had never built one myself, so I did some digging reviewing Andrews work and watched How to Deploy a Scheduled Task with Intune by <a href="https://www.linkedin.com/in/stevew25/">Steven Weiner</a>. I will link below to these resources!</p><p>Here is where I landed. I built a schedule task.</p><h3>The Scheduled Task</h3><p>The scheduled task triggers at every user logon, running under the BUILTIN\Users group at limited privilege. Its job is straightforward: check if Company Portal is installed for the current user, and if not, install it from the staged bundle and dependencies in C:\ProgramData\CompanyPortal. Because it runs in the user&#39;s own session, Add-AppxPackage works reliably every time. And because it fires at every logon, it covers the first user during Autopilot and any future user who signs into the device. But wait won’t the user see a command line or PowerShell popup?</p><h3>Running Silently</h3><p>By default, a scheduled task that launches PowerShell will briefly flash a console window on the user’s desktop not a great experience. To avoid this, the task doesn’t call PowerShell directly. Instead, it executes a VBS launcher (RegisterCompanyPortal.vbs) that invokes PowerShell with -WindowStyle Hidden through WScript.Shell.Run with the window style set to 0 (hidden). The VBS layer acts as a silent wrapper, so the entire process runs invisibly in the background. The user never sees a thing. This is clearly stolen from Andrew’s work and I thank him for that!</p><p>The VBS launcher:</p><pre>CreateObject(&quot;WScript.Shell&quot;).Run &quot;powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File &quot;&quot;C:\ProgramData\Scripts\RegisterCompanyPortal.ps1&quot;&quot;&quot;, 0, False</pre><p>The 0 sets the window style to hidden, and False tells the shell not to wait for the process to finish fire and forget.</p><p>The scheduled task itself is created with a single call:</p><pre>$taskAction = New-ScheduledTaskAction -Execute &quot;C:\ProgramData\Scripts\RegisterCompanyPortal.vbs&quot;<br>$taskTrigger = New-ScheduledTaskTrigger -AtLogOn<br>$principal = New-ScheduledTaskPrincipal -GroupId &quot;S-1-5-32-545&quot; -RunLevel Limited<br>$task = New-ScheduledTask -Action $taskAction -Trigger $taskTrigger -Principal $principal `<br>    -Description &quot;Register Company Portal for the current user at logon&quot;<br>Register-ScheduledTask -TaskName &quot;RegisterCompanyPortal&quot; -InputObject $task -Force</pre><p>A few things worth noting here:</p><ul><li>The principal uses SID S-1-5-32-545 (BUILTIN\Users) rather than a named group this avoids localization issues on non-English builds of Windows.</li><li>-RunLevel Limited ensures no elevation is requested. The task only needs standard user permissions since Add-AppxPackage works in user context.</li><li>-Force makes the registration idempotent if the task already exists from a previous run, it gets overwritten cleanly instead of throwing an error.</li></ul><h3>Timing and Delivery Flow</h3><p>During Autopilot enrollment, the Platform Script runs in the device setup phase before the user ever signs in. This means the scheduled task, VBS launcher, and registration script are all in place before any user hits the desktop.</p><p>When the Win32 app installs also during device setup (but after the platform script) it provisions Company Portal and stages the bundle and dependencies to C:\ProgramData\CompanyPortal. By the time the user signs in for the first time, both pieces are already deployed: the staged files are on disk and the scheduled task is registered.</p><p>At first logon, the task fires, the registration script finds the staged bundle and dependencies and Add-AppxPackage installs Company Portal directly into the user&#39;s session. The app appears in the Start Menu no second logon required, no waiting for a sync cycle.</p><p>For any future user who signs into the same device, the same logon trigger fires, the same check runs, and Company Portal gets installed into their profile automatically. The heavy lifting was done once during Autopilot; the scheduled task just handles the per-user last mile from that point forward.</p><h3>How It All Comes Together</h3><p>The solution has three components that each handle a specific piece of the problem.</p><p><strong>The Win32 app</strong> runs as SYSTEM during device setup. It calls Add-AppxProvisionedPackage to provision Company Portal into the Windows image with its license and dependencies ensuring the OS knows the app exists for future user profiles. It then stages the .appxbundle and all .appx framework dependencies to C:\ProgramData\CompanyPortal, giving the user-context registration script everything it needs to install the app independently.</p><p><strong>The Platform Script</strong> also runs during device setup, before any user signs in. It drops two files into C:\ProgramData\Scripts a PowerShell registration script and a VBS silent launcher then creates a scheduled task that triggers at every user logon under the BUILTIN\Users group.</p><p><strong>The scheduled task</strong> is where it all comes together. When a user signs in, the task fires silently in the background. The registration script checks if Company Portal is already installed for that user. If it is, it exits. If not, it pulls the staged bundle and dependencies from C:\ProgramData\CompanyPortal and calls Add-AppxPackage in the user&#39;s own session the one context where AppX registration is guaranteed to work. Company Portal appears in the Start Menu nearly automatically.</p><p>The beauty of this approach is that each component is self-contained. The Win32 app doesn’t need to know about the scheduled task. The Platform Script doesn’t need to know if the Win32 app has run yet. And the scheduled task doesn’t care how the files got staged it just checks if they’re there and acts accordingly. Provisioning handles the machine, staging handles the payload, and the scheduled task handles the user. Every logon, every user, every time.</p><h3>A Note on Performance</h3><p>The scheduled task is lightweight and safe for everyday use. At each logon, it runs a single Get-AppxPackage check if Company Portal is already installed for the user, the script exits immediately. There&#39;s no heavy processing, no network calls, no disk-intensive operations. The VBS launcher ensures it runs invisibly with no console window, and the task itself runs at limited privilege with no elevation. For the vast majority of logons, the script completes in under a second and the user never knows it ran.</p><h3>Taking It Further — Rudy’s Magic</h3><blockquote>Note that Rudy’s solution requires your environment to support skipping the user ESP (Account Setup phase). If your enrollment flow blocks at the user ESP, the user won’t reach the desktop until ESP completes, and the startup scripts won’t fire until then reducing the benefit of the auto-launch approach. I firmly believe everyone should skip the user ESP, but I’ll digress. Not all environments can.</blockquote><p>With Company Portal reliably installed at first logon, you can now layer on <a href="https://patchmypc.com/blog/launching-the-company-portal-automatically-after-autopilot/">Rudy Ooms’ auto-launch scripts</a> to complete the experience. His first script disables the Windows startup delay by zeroing out WaitForIdleState and StartupDelayInMSec in the registry, so startup tasks fire immediately at logon. His second script places a launcher in the global startup folder that opens Company Portal via the companyportal: URI scheme on first login, using a registry flag to ensure it only runs once per user.</p><p>Pair that with this solution and the experience becomes exactly what it should be: the user signs in, Company Portal installs silently in the background, and it launches automatically — often within seconds of reaching the desktop.</p><p>No more mixing LOB and Win32 apps.</p><p>No more ESP failures.</p><p>No more “wait around until Company Portal shows up” while end users sit there stuck.</p><p>In this post, we closed the “AppX gap” that makes Company Portal so frustrating during Autopilot: provisioning can stage the app to the device, but it doesn’t reliably register it for the first user who signs in. By packaging Company Portal as a Win32 app, staging the bundle + dependencies to a safe location, and using a lightweight scheduled task to register the app in <em>user context</em> at logon, we get consistent, repeatable results — without mixing LOB and Win32 in ESP and without introducing enrollment instability. The end result is the onboarding experience we’ve all wanted: Company Portal is available immediately, installs silently, and can even auto-launch at first desktop with Rudy’s startup magic layered on top. Until next time, IT Professionals — cheers! 🍻</p><h3>Links &amp; Inspiration</h3><p>A few resources that directly shaped this approach and helped me connect the dots:</p><p>Links (resources I leaned on)</p><ul><li><strong>Andrew Taylor — “Automatically backing up user profile data with Intune”</strong> (great example of real-world scripting patterns and deployment approach): <a href="https://andrewstaylor.com/2021/09/21/automatically-backing-up-user-profile-data-with-intune/?utm_source=chatgpt.com">https://andrewstaylor.com/2021/09/21/automatically-backing-up-user-profile-data-with-intune/</a></li><li><strong>YouTube — “How to Deploy a Scheduled Task with Intune”</strong> (a practical walkthrough that helped validate the scheduled task delivery method): <a href="https://www.youtube.com/watch?v=W-qooDTldZI&amp;utm_source=chatgpt.com">https://www.youtube.com/watch?v=W-qooDTldZI</a></li></ul><h3>Inspiration (the spark that kicked this off)</h3><ul><li><strong>Patch My PC — “Launching the Company Portal automatically after Autopilot”</strong> (the “why” behind optimizing the day-one user experience and auto-launch behavior): <a href="https://patchmypc.com/blog/launching-the-company-portal-automatically-after-autopilot/?utm_source=chatgpt.com">https://patchmypc.com/blog/launching-the-company-portal-automatically-after-autopilot/</a></li></ul><p>If you have questions or want to compare notes, I’m always happy to help — reach me on X, LinkedIn, or via email:</p><ul><li>Email: morr@orr365.tech</li><li>X: <a href="https://x.com/home">https://x.com/home</a></li><li>LinkedIn: <a href="https://www.linkedin.com/in/markorr321/">https://www.linkedin.com/in/markorr321/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f04f9f262855" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving Onboarding Experience: The Company Portal Discovery]]></title>
            <link>https://medium.com/@markhunterorr/improving-onboarding-experience-the-company-portal-discovery-746fc9a2a91b?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/746fc9a2a91b</guid>
            <category><![CDATA[windows-11]]></category>
            <category><![CDATA[tunein]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 12:21:43 GMT</pubDate>
            <atom:updated>2026-02-14T12:46:34.950Z</atom:updated>
            <content:encoded><![CDATA[<h3>Improving Onboarding Experience: The Company Portal a Discovery</h3><p>When we think about the Enrollment Status Page (ESP) and device provisioning, there’s a lot to consider. User experience is at the top of the list.</p><p>One thing I’ve always struggled with is the idea of deploying the Company Portal as a Microsoft Store app (new).</p><p>Microsoft has a blog post and some loose documentation that suggests you can deploy Company Portal as a Microsoft Store app (new) and make it a blocking app in the ESP but, at best, experiences may vary.</p><p>Deploying it as a post-ESP required application can delay delivery even further, which creates a poor user experience in environments where users depend on Company Portal to self-service the installation of other apps they use often while they wait for Company Portal to finally arrive on their device.</p><p>Recently, we recognized that Company Portal was taking 45 to 60 minutes (or more) to land on the device, so I set out to see if I could get it there faster. I quickly stumbled upon this great article titled:</p><p><strong>Improving Onboarding Experience: Automatically Launch the Company Portal by </strong><a href="https://www.linkedin.com/in/rudyooms/">Rudy Ooms</a></p><p>Not sure how I missed this originally, but hey — we’re all human. 🙃</p><p>Heres the link:</p><p><a href="https://patchmypc.com/blog/launching-the-company-portal-automatically-after-autopilot/">https://patchmypc.com/blog/launching-the-company-portal-automatically-after-autopilot/</a></p><p>Rudy breaks down how you can deliver the Company Portal application to devices immediately on first login. He even shows you how to launch it so the user sees the UI and can check compliance and application install status in “real” time.</p><p>There’s one caveat I need to call out. I’ve always been taught that for Windows devices; you should never mix and match line-of-business (LOB) apps and Win32 apps. I also don’t work with LOB apps often if ever. In fact, I’ve avoided them since 2021, when mixing them caused enrollment issues at a company I worked at. Basically, I vowed never to do it again.</p><p>However, this solution seemingly works without issue!</p><p>Two important things I missed because I don’t work with LOB apps often are:</p><ol><li>When you upload the app, you must include the dependency application files.</li><li>You must wait for the added dependency status to turn green.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*lPEEfew0qxsZMEcbL-iyJA.png" /></figure><p>Lastly, and most importantly, I tripped up on Rudy’s instructions to set the app to install in the device context. Mostly because I can’t read (he clearly calls it out in his blog post) and I’m not very smart, but I digress. Without doing this, the app doesn’t seem to be tracked during the ESP and doesn’t arrive at first login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvMe5y-dIpESZMYAoeN1eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*lJ-Er-v82KxPYj-2sLyGdw.png" /></figure><p>After multiple tests across multiple environments, the Company Portal now arrives at first login and launches within seconds. What a fantastic solution. Hats off to Rudy this is a significant improvement to the user experience.</p><p>Special thanks to @a_a_r0na on Twitter (I’ll never call it X) for his feedback and screenshots showing how he uploaded the app (including dependencies). Without that, I might have spent days troubleshooting. Huge thanks, man.</p><p>Until next time, IT professionals 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=746fc9a2a91b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Entra-PIM a PowerShell Module]]></title>
            <link>https://medium.com/@markhunterorr/entra-pim-a-powershell-module-45c83fb3df5f?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/45c83fb3df5f</guid>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[entra-id]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 12:03:38 GMT</pubDate>
            <atom:updated>2026-01-29T12:21:39.464Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been following along with my blog, you know I have a real <strong>affinity</strong> for solving problems with PowerShell. One problem I’ve encountered over the years is the clunky web interface for <strong>Microsoft Entra Privileged Identity Management (PIM)</strong>.</p><p>Let’s face it: if you’re working in a Microsoft Admin center every day and need to elevate your just-in-time role before accessing the portal, the graphical user interface just isn’t very good. It’s overly menu-driven, less responsive than I’d like, and role validation can take longer than most of us can tolerate. Even after entering a “reason” for elevation, the activation workflow can take an inordinate amount of time to complete its required steps.</p><p>That’s why I’ve been continuously developing a solution to this problem. What started as a standard PowerShell script iterated through application development and has finally landed as a <strong>PowerShell module</strong>. I’m relatively new to the PowerShell module journey, so I tried to keep it as simple and straightforward as possible.</p><p>Today, I’m excited to announce <strong>Entra-PIM </strong>my PowerShell module for managing Microsoft Entra ID and Azure Resource roles.</p><ul><li><a href="https://www.powershellgallery.com/packages/Entra-PIM/2.1.0">PowerShell Gallery</a></li><li><a href="https://github.com/markorr321/Entra-PIM">GitHub Repository</a></li></ul><h3>Watch Entra-PIM in Action</h3><p><a href="https://www.youtube.com/watch?v=Fyo12aE3fKQ">Entra PIM Demo</a></p><h3>What Is Entra-PIM?</h3><p>Entra-PIM is a cross-platform PowerShell module built to streamline the activation and deactivation of privileged roles in Microsoft Entra ID and Azure Resource environments. It’s designed for administrators, security engineers, and anyone who regularly works with just-in-time privileged access and wants a faster, more secure, and more intuitive way to manage it.</p><p>Think of it as your command-line companion for Privileged Identity Management minus the portal headaches. The best part its fully supported on macOS and Windows!</p><h3>The Problem It Solves</h3><p>Microsoft’s native PIM workflows are powerful, but the user experience leaves something to be desired. Whether you’re activating a Global Administrator role in Entra ID or elevating to Contributor on an Azure subscription, the process involves:</p><ul><li>Multiple browser tabs and portal navigation</li><li>Waiting for page loads and UI rendering</li><li>Manual selection for multi-role scenarios</li><li>Limited visibility into active vs. eligible roles</li><li>No easy way to batch activate or deactivate roles</li></ul><p>For IT pros who live in the terminal, this portal-centric workflow is a productivity killer. Entra-PIM brings PIM management back to where many of us are most comfortable: the command line.</p><h3>Key Features</h3><h3>1. Dual PIM Support: Entra ID and Azure Resources</h3><p>Entra-PIM doesn’t just handle Entra ID roles like Global Administrator or Security Administrator. It also manages Azure Resource roles (Contributor, Owner, User Access Administrator) across subscriptions, resource groups, and individual resources. One tool, two PIM systems, zero friction.</p><h3>2. PIM for Groups</h3><p>Beyond individual role assignments, Entra-PIM supports <strong>PIM for Groups</strong>, allowing you to activate membership in privileged access groups. This is critical for organizations using group-based access controls and role bundling.</p><h3>3. Authentication Context and Step-Up MFA</h3><p>Modern zero-trust environments often require step-up authentication or claims challenges when accessing high-privilege roles. Entra-PIM handles this seamlessly, automatically detecting when step-up MFA is required and prompting you through the browser-based authentication flow.</p><h3>4. Custom App Registrations</h3><p>Many organizations require custom Azure app registrations for compliance, auditing, or security reasons. Entra-PIM supports custom app registrations out of the box. You can configure your own ClientId and TenantId once using the Configure-EntraPIM command, and the tool remembers your settings across sessions. On Windows, configuration is stored in user-level environment variables; on macOS, it integrates with your PowerShell profile.</p><h3>5. Multiple Role Activations and Deactivations</h3><p>Need to activate five roles at once? Entra-PIM’s interactive console lets you select multiple roles with a simple checkbox interface. Activate them all in a single operation, complete with real-time progress feedback. The same goes for deactivations clean up your privileged sessions quickly and efficiently. No more unattended elevated session with an easy to use and often overlooked deactivation workflow.</p><h3>6. Secure Connection Management</h3><p>Security is baked into every step. Entra-PIM uses browser-based authentication with ForceLogin prompts, ensuring fresh credentials every time. Once your session is complete, it can be <strong>disconnected from Microsoft Graph and Azure PowerShell</strong>, leaving no lingering authenticated sessions that could be exploited. It&#39;s the equivalent of logging out when you leave your desk except with a simple key combination.</p><h3>7. Cross-Platform Compatibility</h3><p>Whether you’re on Windows, macOS, or Linux (with PowerShell 7+), Entra-PIM works the same way. The tool detects your platform and adjusts its behavior, accordingly, including OS-specific configuration persistence and terminal compatibility fixes (looking at you, Windows Terminal).</p><h3>8. Auto-Dependency Installation</h3><p>First-time users don’t need to worry about prerequisites. Entra-PIM automatically installs required modules like Az.Accounts, Microsoft.Graph.Authentication, Microsoft.Graph.Identity.Governance, and Microsoft.Graph.Identity.DirectoryManagement on first run. Just install the module and go.</p><h3>9. Interactive Console with Keyboard Shortcuts</h3><p>The tool features an easy-to-use text-based UI (TUI) with intuitive keyboard shortcuts:</p><ul><li><strong>↑/↓</strong>: Navigate roles</li><li><strong>SPACE</strong>: Toggle selection</li><li><strong>Ctrl+A</strong>: Select all</li><li><strong>ENTER</strong>: Confirm</li><li><strong>Ctrl+H</strong>: Help</li><li><strong>Ctrl+Q</strong>: Exit</li></ul><p>No mouse required. No portal tabs. Just keyboard-driven efficiency.</p><h3>10. Persistent Configuration</h3><p>Configure once with Configure-EntraPIM, and your custom app registration settings persist across sessions. Remove them just as easily with Clear-EntraPIMConfig. It&#39;s the kind of quality-of-life improvement that saves time every single day.</p><h3>How It Works</h3><p>Using Entra-PIM is refreshingly simple:</p><pre># Install the module<br>Install-Module -Name Entra-PIM -Repository PSGallery</pre><pre># Run it<br>Start-EntraPIM</pre><ol><li>Your browser opens for authentication (with ForceLogin for fresh credentials)</li><li>You choose between Entra ID PIM or Azure Resource PIM</li><li>The tool displays your eligible and active roles</li><li>You select which roles to activate or deactivate</li><li>The tool handles the Graph API calls, step-up authentication, and policy enforcement</li><li>You get real-time feedback and confirmation</li><li>When you’re done, it disconnects all sessions automatically</li></ol><p>That’s it. No portals. No waiting. No wasted clicks.</p><h3>Why It Matters</h3><p>In a world where security teams are pushing for just-in-time access, least-privilege principles, and zero-trust architectures, PIM is no longer optional it’s essential. But tools are only effective if people actually use them. If the activation process is clunky, slow, or frustrating, users will find workarounds, request standing access, or delay necessary elevation.</p><p>Entra-PIM helps by removing friction. It makes privileged access management fast, secure, and dare I say enjoyable. It respects your workflow and conditional access, integrates with your existing tools, and gets out of your way so you can focus on the actual work.</p><h3>Who Should Use Entra-PIM?</h3><ul><li><strong>Anyone with Entra ID PIM Roles</strong>: If you have eligible roles like Global Administrator, Security Administrator, Privileged Role Administrator, or any other Entra ID role requiring activation, this tool streamlines your daily workflow.</li><li><strong>Azure Resource Role Users</strong>: Anyone with eligible Azure roles (Contributor, Owner, User Access Administrator, etc.) across subscriptions, resource groups, or individual resources.</li></ul><h3>Wrapping Up</h3><p>PIM doesn’t have to be annoying. With Entra-PIM, you get the security and compliance benefits of just-in-time access without sacrificing speed or simplicity. Whether you’re managing a handful of role activations or juggling dozens across multiple tenants, this tool streamlines your just in time activations right from your PowerShell terinal.</p><p>The best part? It’s free, open-source, and ready to use today. Install it, try it, and see how much time you save. If you find it useful, share it with your team, contribute to the project, or just drop me a note I’d love to hear how you’re using it.</p><p>Until next time IT Professionals! 🥂</p><h3>Get Started Today</h3><p>Entra-PIM is open-source, actively maintained, and available now on the PowerShell Gallery.</p><p><strong>Install it:</strong></p><pre>Install-Module -Name Entra-PIM -Repository PSGallery</pre><p><strong>Learn more:</strong></p><ul><li><a href="https://www.powershellgallery.com/packages/Entra-PIM/2.1.0">PowerShell Gallery</a></li><li><a href="https://github.com/markorr321/Entra-PIM">GitHub Repository</a></li></ul><h3>Need Help?</h3><p>Have questions, feedback, or feature requests? I’d love to hear from you!</p><p><strong>Built-in Help:</strong></p><pre>Get-EntraPIMHelp</pre><p><strong>Connect with me:</strong></p><ul><li><a href="https://www.linkedin.com/in/markorr321/">LinkedIn</a></li><li><a href="https://x.com/MarkHunterOrr">Twitter/X</a></li><li><a href="https://medium.com/@markhunterorr">Medium</a></li><li><a href="/service/mailto:markorr321@gmail.com">Email</a></li></ul><p><strong>Found a bug?</strong> Open an issue on <a href="https://github.com/markorr321/Entra-PIM/issues">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45c83fb3df5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Autopilot Clean Up with Microsoft Graph and PowerShell]]></title>
            <link>https://medium.com/@markhunterorr/autopilot-clean-up-with-microsoft-graph-and-powershell-e3b483a0293f?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3b483a0293f</guid>
            <category><![CDATA[microsoft-graph]]></category>
            <category><![CDATA[microsoft-intune]]></category>
            <category><![CDATA[autopilot]]></category>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[entra-id]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 11:57:08 GMT</pubDate>
            <atom:updated>2026-01-29T12:15:20.626Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have ever enrolled devices into Microsoft Intune at scale or done iterative testing in a lab environment, you begin to realize very quickly that the process to remove devices from Intune and Autopilot can be very annoying. Removing a device from Intune happens relatively quickly but remnants of the device appear to stay in Intune long after you click delete. In fact, deleting the device doesn’t immediately remove the object from the graphical user interface at all. It&#39;s not until you’ve click into the device that Intune shows you any evidence that a command has been sent to the device at all to be deleted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_eX7_okfscT9rJ7GaDhz-A.gif" /><figcaption>Deletion from Intune</figcaption></figure><p>Then if you are working on a lab or doing a cleanup exercise you have to remove the device from Autopilot. My experience says that it typically takes about 15 minutes for a device to be removed from Autopilot after the deletion command has been issued but it testing, I have even seen it take upwards of 30 minutes which just isn’t scalable.</p><p>If you have deleted the device from Intune and Autopilot and you have waited the undetermined amount of time for those records to disappear from the respective areas in the admin portal you still might have a device record in Entra ID. I present this example to show how tightly coupled the three device registrations are. Oh, and another device record to clean up!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ym-_NdnwI6su35XNq8Qcew.gif" /><figcaption>Entra Deletion</figcaption></figure><p>So, if you have followed along this far if you are using Intune and Autopilot the device object lives three different places. For those following along thats a device record for the same device three different places:</p><p>Intune — Autopilot and Entra ID</p><p>When using the graphical user interface that&#39;s three different menu tree and three different deletion behaviors and clean up routines that you have to go through.</p><p>Now, let&#39;s talk about why you would need to remove a device from all three platforms.</p><ol><li>Real World Device Clean Up — The device has been retired and is no longer a part of your current fleet of devices. Perhaps the device was broken and replaced.</li><li>Device Clean Up from Lab Activities — Perhaps you have a lab where you are constantly taking devices in and out of Intune and Autopilot and putting them right back in this is a big reason why administrators and engineers remove and add devices.</li><li>Merger or Acquisition aka Migrations — Perhaps you have been tasked with moving devices from one tenant to another and want to clean those device records up after you migrate or perhaps you have to remove them before you can enroll them into the new tenant. This can be a huge lift and high effort intiative.</li></ol><p>Whatever the reason you need to remove a device it can be painful to deal with. With that in mind I set out build a PowerShell script that will do just that. This tool is inspired by the work of <a href="https://www.linkedin.com/in/ugurkocde/">Ugur Koc</a> and <a href="https://www.linkedin.com/in/andrew-taylor-41707916/">Andrew Taylor</a> who each have their own version of Autopilot clean up solutions. An extra sprinkle inspiration was provided by <a href="https://www.linkedin.com/in/mrtbone/?originalSubdomain=se">T-Bone Granheden</a>.</p><p>What I have created is an interactive PowerShell tool for device cleanup across Windows Autopilot, Microsoft Intune, and Microsoft Entra ID. Features automatic module installation, serial number validation, real-time deletion monitoring, and What If mode for safe testing.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FSLvbbjJCvHo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSLvbbjJCvHo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSLvbbjJCvHo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9895408861c55ce0ef4625714a1a0e81/href">https://medium.com/media/9895408861c55ce0ef4625714a1a0e81/href</a></iframe><h3>Features</h3><ul><li>📦 Automatic Module Installation — Checks for required Microsoft Graph modules and prompts to install missing dependencies</li><li>🖱️ Interactive Device Selection — Grid view interface to select devices for removal</li><li>🔄 Multi-Service Cleanup — Removes devices from all three services (Autopilot, Intune, and Entra ID)</li><li>🔍 Serial Number Validation — Prevents accidental deletion of devices with duplicate names</li><li>📊 Real-Time Monitoring — Tracks deletion progress with automatic verification</li><li>👥 Duplicate Handling — Identifies and processes duplicate device entries</li><li>🧪 WhatIf Mode — Preview deletions without making actual changes</li><li>⚙️ Edge Case Management — Handles pending deletions, missing devices, and other scenarios</li><li>🔔 Sound Notifications — Plays success beeps when cleanup is complete</li></ul><p>The best part to me is that I don’t have to go to each individual service and confirm that they have been deleted. Its verified right in the terminal. Additionally, there is an audio alert at the end of the script that indicates when the device has been removed. This way you can set it and forget it, and the audible notification will alert you when the device or devices have been removed.</p><p>I wanted to give one more shout out before we close today. Shout out to <a href="https://www.linkedin.com/in/acjuelich/">Adam Juelich</a> for giving me the idea to add application-based authentication as a auththentication method and shout out to <a href="https://www.linkedin.com/in/rich-burton-a000671/">Rich Burton</a> for the inspiring me to add the device wipe flow to mix. This is not something I had thought about adding. The device wipe function is available in this model or as its own isolated script.</p><p>The added functionality uses the Invoke-DeviceWipe command to kick off the cleanup workflow by sending a remote wipe command to the target devices via the Microsoft Graph API this way not only are the device records cleanup in unison but they the machine is reset along the way.</p><p>As always you can find me on the socials, and you can find the repository for this work on my GitHub at:</p><p><a href="https://bit.ly/Autopilot-Cleanup">https://bit.ly/Autopilot-Cleanup</a></p><p>Until next time IT Professionals! 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3b483a0293f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On-Demand Device Sync from ABM into Intune with Microsoft Graph PowerShell!]]></title>
            <link>https://medium.com/@markhunterorr/on-demand-device-sync-from-abm-into-intune-with-microsoft-graph-powershell-e38a6f4f99c6?source=rss-f4c4977878b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e38a6f4f99c6</guid>
            <category><![CDATA[intune-for-macos]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[microsoft-intune]]></category>
            <category><![CDATA[apple-business-manager]]></category>
            <dc:creator><![CDATA[Mark Orr - Yet Another Microsoft Intune Blog]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 22:25:30 GMT</pubDate>
            <atom:updated>2025-10-08T22:25:30.787Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog is not an original idea or even original work it&#39;s just my take on the process with a little flair and a little mismatch between PowerShell and improved user interface and use ability. All of the hard work was done by Jorge Suarez!</p><p>Some back story:</p><p>My wife has been working through a shared iPad enrollment via Microsoft Intune. This has included:</p><p>1. Updating the devices to iOS 26.</p><p>2. Wiping the devices.</p><p>3. Adding the device to Apple Business Manager (ABM) with Apple Configurator.</p><p>4. Syncing the Devices to Microsoft Intune.</p><p>5. Connecting the device to the networking pulling down the management profile and enrolling the devices.</p><p>It&#39;s been a full white glove project considering 90% of the iPads she has enrolled were previously in use and even enrolled in other MDM environments.</p><p>This is not a perfect process, and we know that. One major hang up in this process is that by default Apple Business Manager (ABM) devices assigned to Automated Device Enrollment (ADE/DEP) can take hours to appear in Microsoft Intune. Intune’s built-in background syncs run on their own schedule, and manual syncs are throttled only allowed about every <strong>15 minutes</strong>. That said Microsoft documentation indicates that devices can take up to 12 hours to appear in the admin center. However, you can manually start the sync.</p><p><a href="https://learn.microsoft.com/en-us/intune/intune-service/enrollment/tutorial-use-device-enrollment-program-enroll-ios">Tutorial — Use Apple Business Manager to enroll iOS/iPadOS devices in Intune — Microsoft Intune | Microsoft Learn</a></p><p>This is an extremely mundane and repetitive task. To break it down and get a bit granular with the process I’ll Walk you through it. For the first run. It requires:</p><ol><li>Elevating Entra ID PIM role to at least Intune Administrator. (If you utilize PIM)</li><li>Then navigating to: <a href="https://intune.microsoft.com./">https://intune.microsoft.com.</a></li><li>Then across the menu base graphical user interface:<br>Home → Devices → iOS/iPadOS →Enrollment →Enrollment Program Tokens →Selecting the token → Devices → Sync</li></ol><p>Even then your manual syncs via the GUI are throttled to 15-minute intervals. Given the overhead on this process, I set out to see if I could simplify the approach via PowerShell.</p><p>In my search I quickly came across a blog written by Jorge Suarez where he talks about syncing ABM and VPP tokes with Intune via PowerShell utilizing Microsoft Graph.</p><p><a href="https://www.jorgeasaur.us/syncing-abm-and-vpp-tokens-with-intune-a-powershell-script-for-the-lazy-admin/">Syncing ABM and VPP tokens with Intune — A PowerShell Script for the Lazy Admin</a></p><p>I built a solution on top of Jorge’s work that, provides <strong>on-demand synchronization</strong> of Apple Business Manager (ADE/DEP) devices with Microsoft Intune. The script performs a sync when invoked, then displays the last successful sync time, total devices processed, and the next eligible sync window based on Microsoft’s 15-minute API limit. The script enters a cooldown period with a visible countdown, after which administrators can press <strong>Enter</strong> to trigger the next sync. This interactive loop gives admins control over device enrollment updates without hitting API throttling, while providing clear visibility into sync timing and results.</p><p>The full script can be found on my GitHub:</p><p><a href="https://github.com/markorr321/Automated-Device-Enrollment-Sync">https://github.com/markorr321/Automated-Device-Enrollment-Sync</a></p><p>An example can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVr-G3GqdatpI11c4-gstA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZwDOTZd8cPXbuimnbheXdw.png" /></figure><p>Now let&#39;s walk through the code:</p><h3>Authentication Section (Lines 107–114)</h3><pre>$scopes = @(&#39;DeviceManagementServiceConfig.ReadWrite.All&#39;)<br>Connect-MgGraph -Scopes $scopes -NoWelcome</pre><p><strong>What it does</strong>: Connects to Microsoft Graph with the permissions needed to read and modify Intune device management settings.</p><p><strong>Real Example:</strong> When you run this, you’ll see a browser popup asking you to sign in to your Microsoft 365 account and consent to the app accessing Intune on your behalf.</p><h3>Main Loop Logic (Lines 122–134)</h3><pre>while ($true) {<br>  $depSettings = Get-MgBetaDeviceManagementDepOnboardingSetting<br>  if (-not $depSettings) {<br>    Write-Info &quot;No ADE/DEP tokens found.&quot;<br>    return<br>  }</pre><p><strong>What it does</strong>: Continuously checks for Apple Business Manager tokens configured in your Intune tenant.</p><p><strong>Real Example</strong>:</p><ul><li>If you have tokens: Script finds them and processes each one</li><li>If you do not have any tokens: Script displays “No ADE/DEP tokens found” and exits gracefully</li></ul><h3>Token Information Display (Lines 140–150)</h3><pre>foreach ($dep in $depSettings) {<br>  Write-Host &quot;`n📱 &quot; -NoNewline -ForegroundColor Blue<br>  Write-Host &quot;Token: &quot; -NoNewline -ForegroundColor White<br>  Write-Host &quot;$($dep.TokenName)&quot; -NoNewline -ForegroundColor Yellow<br>  Write-Host &quot; (Apple ID: &quot; -NoNewline -ForegroundColor Gray<br>  Write-Host &quot;$($dep.AppleIdentifier)&quot; -NoNewline -ForegroundColor Cyan<br>  Write-Host &quot;)&quot; -ForegroundColor Gray</pre><p><strong>What it does:</strong> Loops through each Apple token and displays its name and Apple ID.</p><p>Real Example Output:</p><p>📱 Token: Corporate iPads (Apple ID: admin@company.com)<br>📱 Token: Executive Devices (Apple ID: exec@company.com)<br>📱 Token: Student Fleet (Apple ID: education@school.edu)</p><h3>Sync Status Retrieval (Lines 153–176)</h3><pre>$pre = Get-MgBetaDeviceManagementDepOnboardingSetting -DepOnboardingSettingId $dep.Id |<br>  Select-Object TokenName, AppleIdentifier, LastSuccessfulSyncDateTime, LastSyncTriggeredDateTime, SyncedDeviceCount<br><br>$lastSuccessDateTime = if ($pre.LastSuccessfulSyncDateTime) { <br>  [DateTime]::Parse($pre.LastSuccessfulSyncDateTime).ToLocalTime()<br>} else { $null }<br><br>$lastTriggeredDateTime = if ($pre.LastSyncTriggeredDateTime) { <br>  [DateTime]::Parse($pre.LastSyncTriggeredDateTime).ToLocalTime()<br>} else { $null }</pre><p><strong>What it does:</strong> Gets detailed sync information for each token and converts UTC times to your local timezone.</p><p><strong>Real Example:</strong> If Microsoft’s servers say the last sync was at “2025–09–25T20:15:23Z” (UTC), this converts it to “09/25/2025 3:15:23 PM” (Central Time).</p><h3>Cooldown Period Logic (Lines 191–203)</h3><pre>if ($lastTriggeredDateTime) {<br>  $timeSinceLastSync = (Get-Date) - $lastTriggeredDateTime<br>  $cooldownMinutes = 15<br>  <br>  if ($timeSinceLastSync.TotalMinutes -lt $cooldownMinutes) {<br>    $nextSyncTime = $lastTriggeredDateTime.AddMinutes($cooldownMinutes)<br>    $remainingSeconds = [math]::Ceiling(($nextSyncTime - (Get-Date)).TotalSeconds)</pre><p><strong>What it does: </strong>Calculates if Microsoft’s 15-minute cooldown period is still active.</p><p><strong>Real Example Scenarios:</strong></p><ul><li>Last sync: 3:00:00 PM</li><li>Current time: 3:05:00 PM</li><li>Calculation: 5 minutes elapsed, 10 minutes remaining</li><li>Action: Show countdown timer for 10 minutes</li><li>Last sync: 3:00:00 PM</li><li>Current time: 3:16:00 PM</li><li>Calculation: 16 minutes elapsed, cooldown expired</li><li>Action: Proceed with sync immediately</li></ul><h3>Interactive Countdown Timer (Lines 217–243)</h3><pre>while ($remainingSeconds -gt 0) {<br>  $minutes = [math]::Floor($remainingSeconds / 60)<br>  $seconds = $remainingSeconds % 60<br>  <br>  Write-Host &quot;Time remaining: &quot; -NoNewline -ForegroundColor White<br>  Write-Host &quot;$($minutes.ToString(&#39;00&#39;)):$($seconds.ToString(&#39;00&#39;))&quot; -NoNewline -ForegroundColor Yellow<br>  <br>  if ([Console]::KeyAvailable) {<br>    $key = [Console]::ReadKey($true)<br>    if ($key.Key -eq &#39;Enter&#39;) {<br>      # Exit logic here<br>    }<br>  }<br>  Start-Sleep -Seconds 1</pre><p><strong>What it does:</strong> Shows a live countdown timer that updates every second, with option to exit early.</p><p><strong>Real Example Output</strong>:</p><p>⏰ Time remaining: 14:45<br>⏰ Time remaining: 14:44<br>⏰ Time remaining: 14:43<br>[Press Enter to exit]</p><h3>Actual Sync Execution (Lines 277–286)</h3><pre>Sync-MgBetaDeviceManagementDepOnboardingSettingWithAppleDeviceEnrollmentProgram `<br>  -DepOnboardingSettingId $dep.Id -ErrorAction Stop<br><br>Write-Host &quot;`n   ✅ &quot; -NoNewline -ForegroundColor Green<br>Write-Host &quot;ADE sync action submitted successfully!&quot; -ForegroundColor White</pre><p><strong>What it does:</strong> Calls the Microsoft Graph API to trigger an actual sync between Apple Business Manager and Intune.</p><p><strong>Real Example: </strong>This is equivalent to going into the Intune portal, finding your Apple token, and clicking the “Sync” button but via PowerShell.</p><p>The script in its entirety can be found here:</p><p><a href="https://github.com/markorr321/Automated-Device-Enrollment-Sync">https://github.com/markorr321/Automated-Device-Enrollment-Sync</a></p><p><strong>Why use the tool?</strong></p><p>If you have ever had to enroll hundreds of iPads like my wife and you have ever had to wait for Apple devices to show in Intune, you know the pain of navigating the GUI. You also know the pain associated with waiting 12 hours for the back-end process to sync devices automatically.</p><p>This tool combines the OnDemand action available in the portal without the fanfare of the menu drive GUI. It also gives you a repeatable script you can run without having to recall where the sync button lives. The addition of the countdown timer and “Next sync available…” indicators blend the creature comforts of the portal and the ascriptive approach provide by Jorge!</p><p>The script is simply designed to make your life easier while you are prepping Apple devices for enrollment. It could even be used in support of OEM driven deployments.</p><p>Throughout the creation of this script, I believe I have discovered yet another automation opportunity where an administrator with the appropriate permissions could create an Azure Logic App to schedule and create a job to start an Azure Automation Runbook so the synchronization between ABM and Intune is happening every 15 minutes without any administrative overhead!</p><p>I’ll save that for the next blog! Until next time IT Professionals!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e38a6f4f99c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>