Disconnected Remote Desktop User?

I’m having trouble where clients with Disconnected remote desktop user sessions do not process post-action reboot commands.

I’ve found I could use “query.exe user” or “qwinsta.exe” to list sessions, and “rwinsta.exe” to disconnect them. I was checking whether there are any built-in properties that would let me tell whether a given session is a Remote Desktop session in “Disconnected” state. I don’t see any properties of “user” that look applicable…