| Previous | Next |
| STATUS_CTX_WD_NOT_FOUND | STATUS_CTX_SHADOW_DISABLED |
STATUS_CTX_SHADOW_INVALID
The shadow relationship violates a structural precondition
STATUS_CTX_SHADOW_INVALID reports an invalid remote-control relationship. Windows documents examples such as attempting to control the caller's own session, a session already controlling the caller, a session with no logged-on user, or another session from the console context.
That makes this status different from STATUS_CTX_SHADOW_DENIED. Policy or consent cannot authorize a target that is structurally ineligible for remote control.
Useful evidence
- Enumerate the controller and target session IDs, states, users, and existing remote-control relationships before starting shadowing.
- Reject self-targeting and cycles in automation before making the server call; do not infer eligibility from a user name alone.
- If the target has no interactive user or changed state, select a supported management path instead of repeatedly requesting remote control.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft: Remote Desktop Services API functions
- Microsoft: shadow a Terminal Server session
Looking for a different code? Search another status or error code.