Investigate a user's slow computer end to end: check device health, compliance, policies, apps, and storage, then trigger a sync and remote reboot as first-line remediation.
Complexity: Intermediate. Impact: endpoint-health + user-support + device-compliance + remote-remediation.
Why use this workflow
A slow computer is one of the most common helpdesk tickets, and one of the easiest to misdiagnose without data. Before you remote-control a user's machine or schedule a reimage, you can answer most diagnostic questions from Intune: when the device last checked in, whether it is compliant, whether policies apply cleanly, whether storage is exhausted, whether malware is present, and what is installed.
This workflow walks through a structured audit of a single user's Windows device using Intune and Microsoft Graph, then applies two non-destructive remediations: a device sync (to force policy re-evaluation) and a remote reboot (to clear memory, restart services, and apply pending updates). Use it as a standard first response to a performance complaint before you escalate to hands-on troubleshooting.
Expected outcomes
- The user's device identity in Intune (device ID, name, enrollment type, ownership)
- Compliance state and per-policy evaluation results, including any errored policies
- Configuration profile assignment status
- Storage utilization, encryption state, and malware counts
- A list of installed or detected applications
- The last check-in timestamp, to detect stale or offline devices
- A triggered device sync so the endpoint picks up the latest policy
- A triggered remote reboot to clear transient performance issues
- A structured finding report you can hand back to the user or paste into your ticket
Risks and considerations
- Remote reboot is immediate. The
rebootNowaction gives the user only a short warning. Confirm with the user first, or at minimum notify them, before you trigger it. They may lose unsaved work. - Compliance state and policy state are different. A device can report as compliant overall while an individual policy is in an error state (for example, with the Default Device Compliance Policy). Always check
deviceCompliancePolicyStates, not only the top-levelcomplianceStatefield. - Virtual machines often report 0 physical memory. Do not mistake this for a hardware fault. Guests on VMware or Hyper-V frequently do not expose physical memory to Intune. If the device is a virtual machine, check the hypervisor host's resource allocation before you assume a guest-side problem.
$filterhas limits onmanagedDevices. The Intune Graph endpoint does not support$filteronuserIdor on some property combinations. UseuserPrincipalName eq '...'for reliable filtering.- Sync is not instant. The sync action queues a check-in request. Completion depends on the device being online and responsive. Wait before you re-audit.
- Do not reimage on the first report. Capture the audit data first. It lets you distinguish a policy problem from a hardware problem or a user-behavior problem.
Required permissions
| Permission | Why it's needed |
|---|---|
| User.Read.All | Look up the user's account from display name or UPN |
| DeviceManagementManagedDevices.Read.All | Read managed device properties, compliance states, configuration states, and detected apps |
| DeviceManagementManagedDevices.PrivilegedOperations.All | Trigger remote actions such as syncDevice and rebootNow |
Ask Dex
Paste the prompt into a Dex conversation.
Prompt for IT admins
{user} reports their computer is very slow. Audit the device status in Intune (health, compliance, last check-in, policy and app state, storage, encryption, malware), then take safe first-line remediation steps - trigger a device sync and, if appropriate, a remote reboot. Report the findings and any follow-up recommendations.
How an end user can ask Dex
My work laptop is really slow today, can you take a look?
Manual steps (admin center)
1. Open the device record
- Go to the Microsoft Intune admin center > Devices > All devices.
- Search for the user's name or the device name. Select the device to open its overview.
2. Review the Overview tab
- Compliance: should read Compliant. If not, note the reason.
- Last check-in: a long gap suggests the device is offline or the MDM agent is stuck.
- Primary user: confirm that it matches the reporting user.
- Storage: compare free and total space. Low free space can directly cause slowness.
3. Drill into policy health
- In the device, open Device compliance and confirm that each assigned policy shows Compliant, not Error or Conflict.
- Open Device configuration and check each profile's state. Errors here often indicate settings that cannot apply on the device (for example, missing hardware or a wrong OS version).
- Open Managed Apps and Discovered apps and scan for unexpected or resource-heavy software.
4. Trigger a sync
- On the device overview toolbar, select Sync.
- Confirm the action. Intune queues a check-in request to the device.
5. Trigger a reboot (if appropriate)
- Notify the user first to prevent data loss.
- On the toolbar, select Restart (or More > Restart).
- Confirm the action.
6. Report findings
Paste the key fields into the ticket: compliance state, last sync, storage, any errored policies, and the remediation actions you took.
Microsoft Graph API
1. Resolve the user
GET https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'{firstName}') or startswith(userPrincipalName,'{upnPrefix}')&$select=id,displayName,userPrincipalNameCapture the user's id and userPrincipalName.
2. List the user's managed devices
Important: The managedDevices endpoint does not support $filter on userId. Filter on userPrincipalName instead:
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=userPrincipalName eq '{upn}'Key response fields to capture: id, deviceName, operatingSystem, osVersion, complianceState, lastSyncDateTime, enrolledDateTime, model, manufacturer, totalStorageSpaceInBytes, freeStorageSpaceInBytes, isEncrypted, windowsActiveMalwareCount, joinType.
3. Get per-policy compliance state
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/deviceCompliancePolicyStatesLook for any entry with "state": "error" or "nonCompliant".
4. Get configuration profile state
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/deviceConfigurationStates5. List detected apps
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/detectedApps?$top=50Page through the results with $skip if @odata.count exceeds 50.
6. Trigger a device sync
POST https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/syncDeviceReturns 204 No Content on success.
7. Trigger a remote reboot
POST https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/rebootNowReturns 204 No Content. The device restarts after it receives the command.
PowerShell
Design the script to run read-only by default, so that remediation actions require explicit switches.
Prerequisites
- PowerShell 7 or later
- The
Microsoft.Graphmodule:Install-Module Microsoft.Graph -Scope CurrentUser - Sign in with:
Connect-MgGraph -Scopes 'User.Read.All','DeviceManagementManagedDevices.Read.All','DeviceManagementManagedDevices.PrivilegedOperations.All'
Approach
- Resolve the user by UPN or display name.
- Fetch all managed devices for that user.
- For each Windows device, pull compliance policy states, configuration states, detected apps, and storage info.
- Print a formatted report with health flags (errored policies, low storage, stale check-in, no encryption).
- Only if the operator passes a sync switch, call
syncDevice. - Only if the operator passes a reboot switch, prompt for confirmation and then call
rebootNow.