Skip to content

Instantly share code, notes, and snippets.

@joegasper
Last active February 10, 2020 20:59
Show Gist options
  • Select an option

  • Save joegasper/5dc4a626b15e8cab9c6dbe76a2a9afb7 to your computer and use it in GitHub Desktop.

Select an option

Save joegasper/5dc4a626b15e8cab9c6dbe76a2a9afb7 to your computer and use it in GitHub Desktop.
Remote Desktop Session Shadowing Mode in Windows 10
#Inspired by http://woshub.com/rdp-session-shadow-to-windows-10-user/
#You could feed ConvertFrom-String a template to have a perfect object from the qwinsta.exe command, but I didn't want to
#have to keep the template file around.
#This is quicker than walking someone through Quick Assist, but QA will work over the internet.
#This command will shadow a user's Windows 10 system and you will have control (after remote user's consent if you are proper - see GPO in the link).
$PC=(Read-Host -Prompt "PC Name");$ID = (qwinsta.exe /server:$PC | ConvertFrom-String | Where-Object P2 -eq console | select P4).P4;mstsc.exe /shadow:$ID /v:$PC /control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment