Skip to main content
KBY Technologies Logo

Replace Remote-Control Sessions With Intune Device Query for First-Line Windows Triage

Can Intune device query replace remote sessions for Windows tickets? See the role, limits and saved queries to answer disk, service and patch questions.

KBY Technologies10 min readTier L115 min
Replace Remote-Control Sessions With Intune Device Query for First-Line Windows Triage

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

An Intune device query lets a service desk engineer ask a Windows device a direct question and read the answer, so a remote-control session is no longer the default first step. It returns live data, such as free disk space or a service state, over Windows Push Notification Services. Plan around the documented limits of 15 queries a minute and 128 KB of results, so keep saved queries narrow.

The queries below use only entities and properties that Microsoft documents. Intune Advanced Analytics is a licensed add-on to Intune Plan 1 or Plan 2, so confirm the licence before anything else.

#How it usually goes when a Windows ticket arrives

Most first-line teams treat a remote session as the universal opener. A user reports a slow laptop, a missing update or a service that will not start, and the engineer connects to the screen to look. The session answers the question, but it also interrupts the user and needs them to be present.

That habit has a cost that is easy to miss. Each session takes the user away from their work, and the engineer often spends most of it reading one value, such as free space on C: or the state of a single service. Often the only record is a ticket note, so the next engineer repeats the same looking.

Microsoft frames the alternative directly. Its guidance asks teams to review the support tasks that normally need a remote control session, and to check whether a single device query can complete them.

Its examples are checking a running service, reading a registry value for an application setting, checking an application version and listing the top processes by use.

#What to do instead: ask the device first

The improved workflow puts a saved query ahead of the remote session. The engineer runs the query for the symptom, reads the result, and only starts a session when the answer shows that someone needs to see or touch the desktop. Each step has a reason.

  1. Run the saved query for the symptom. It reads state straight from the device, so you work from current data and not from what the user remembers.
  2. Decide from the answer. A stopped service or a nearly full drive points to a specific fix, and that avoids a session just to look around.
  3. Act through a remote device action where one fits. Microsoft lists Restart, Run remediation, Collect diagnostics and Sync among the Windows actions.
  4. Start a remote assistance session only when the query cannot answer the question. Record why, because that note shows which query is missing from the library.

Following along? Tap a step’s number to tick it off.

The diagram shows the same path, including where a failed query stops the process.

Loading diagram...

For “did the patch land”, list the newest updates, and for encryption confirm the BitLocker state.

1WindowsQfe
2| order by InstalledDate desc
3| take 5
4| project HotFixId, InstalledDate

For recent application errors, the WindowsEvent entity needs a log name and a look-back time, so the query names both.

1WindowsEvent(Application, 1d)
2| where Level == "ERROR"
3| project LoggedDateTime, EventId, ProviderName, Message
4| take 20

Save each query in your ITSM knowledge base against the ticket type it answers, which is Microsoft’s own suggestion. Link the same article from the symptom guides your team already uses, such as the application reliability walkthrough, and note that tenants with Advanced Analytics see the Device timeline tab in its place.

Young woman working remotely with a laptop in a modern indoor office setting, showcasing tech culture.
Photo by Christina Morillo on Pexels

#Keeping it safe: who can run queries and what they can see

Device query is read-only, but it can still expose a lot. Process command lines and event messages can include user names, paths and arguments, so treat results as sensitive. That is a recommendation, not a Microsoft statement.

  • Grant the Managed devices Query permission only to engineers who need live device data, and keep it separate from roles that can wipe, retire or delete devices.
  • Do not paste query results into tickets that external parties can read. Copy only the value that answers the question.
  • Remember the documented caveat that a user with local administrator rights might change client-based results such as OS version and registry values. Query output is evidence, not proof.
  • Keep state-changing steps out of the saved queries. Restarts and remediations are device actions with their own role requirements, so run them as a deliberate second step.

When the query is not enough, run a remediation on demand against the one device. Microsoft lists Run remediation as a Windows device action, and it is a better follow-up than a remote session for a known fault.

#Check it worked on a pilot device

Prove each saved query before the service desk relies on it. Use one pilot device that is online and meets the prerequisites above, and run every query once.

  1. Run the disk query and compare the free space with what Windows shows on the device. They should agree to within normal change.
  2. Run the service query for a service you know is running, then for one you know is stopped. The State column should differ.
  3. Run the event query and confirm the rows come back, and that the result is not truncated. Microsoft truncates results over 128 KB and tells you how many rows were cut.
  4. Run the set of queries repeatedly in one minute. Past 15 queries you should see a query limit error, and waiting a minute clears it.

Stop and fix the prerequisites if any query returns nothing from a device that is on and signed in. Do not widen the role to get past an error. Check the licence, ownership and WNS first.

#Where it goes wrong with device query

Most failures fall into a few patterns, and each has a documented cause or a clear check.

  • The query times out or fails on a device that is online. Device query depends on Windows Push Notification Services, which cannot be disabled or bypassed. If WNS is blocked or unavailable, the query fails, so check that the network allows it.
  • The tab is missing for an engineer. The account lacks the Managed devices Query permission, or the device is not corporate owned.
  • A query is rejected. The input is limited to 2,048 characters and !like is not supported. Use like or contains with a positive match and shorten the query.
  • A registry or file query behaves oddly. Binary registry values are not returned, and a FileInfo query returns an error if the file is in use.
  • Fleet-wide questions hit a cap. Device query for multiple devices allows 10 queries a minute and 1,000 a month, with about 50,000 records per query, so keep it for trend questions and not for per-ticket use.

For a device that has not checked in at all, a query cannot help. Use the script that lists devices not synced in N days to find it first.

Hands typing on a blue keyboard with a branded cup on a table.
Photo by Christina Morillo on Pexels

#Backing out and recovering when queries fail

Device query changes nothing on the device, so there is no device state to roll back. The change you can undo is access.

  1. If a pilot reveals a problem, remove the custom role assignment from the pilot group, using the role’s assignments in the admin centre.
  2. If the role itself is wrong, edit its permissions or delete it only after no assignments remain. Record the original permissions first so you can recreate it.
  3. Return to the previous process while you fix the cause. Remote sessions remain available through the New remote assistance session action.
  4. After a fix, run the pilot checks again and confirm the three main queries return data before reassigning the role.

If a remediation or restart you triggered after a query made things worse, stop and escalate. Those are device actions, and Microsoft documents their prerequisites on its device actions page. Also see why a remediation can show without issues and never run before you rely on one as a follow-up.

#How to tell it worked

Define a baseline before the pilot starts. Count, from your ITSM, how many Windows tickets in a typical two weeks were closed after a remote session, and how many of those needed only a read of device state. Tag tickets that used a saved query.

The signal is the share of eligible tickets answered by a query alone, and the number of remote sessions that were started only to look. Review it monthly. A query that is rarely used is a candidate for removal, and a ticket type that keeps ending in a session is a candidate for a new saved query. Set your own threshold with the team, because no figure here is a benchmark.

#Before you roll it out to the service desk

  • Licence confirmed and the Device Query tab visible on a pilot device.
  • Pilot device is corporate owned, Entra joined or hybrid joined, and online.
  • Custom role contains the Managed devices Query permission and is assigned to a pilot group only.
  • Every saved query has been run once on the pilot and checked against the device.
  • Queries are stored in the knowledge base against the ticket type they answer.
  • The team knows the limits: 15 queries a minute, 128 KB results and 2,048 characters of input.
  • Staff know that results are sensitive and that query output is not proof if the user has local admin rights.
  • A baseline of remote sessions is recorded, and a review date is set.

The next safe decision is to widen the role to the full service desk once two weeks of pilot data show the queries answering real tickets. Until then, keep remote sessions as the fallback.

About this page

Credited to

Dates

Published

Sources

This page lists no external sources.

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Found this useful? Follow KBY for more like it.

Reader Interaction

Comments

Add a thoughtful note on Replace Remote-Control Sessions With Intune Device Query for First-Line Windows Triage. Comments are checked for spam and held for moderation before appearing.

Loading comments...

More from KBY that goes with this article.

Discover more

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Operate smarter, with fewer recurring tickets.

Receive new operational playbooks, incident-prevention guidance, automation scripts and recovery runbooks.