So this is what I have in a batch file. What I need it to do is
- Show the current RDP sessions.
- Prompt for the session to shadow
- User input the session ID.
Then the mstsc /shadow: /control /noconsentprompt
is executed with the session ID indicated at prompt where /shadow:X
is
This is what I have but how to I insert the session ID chosen by user input into the /shadow: field ?
Thanks for your help.
@echo off
qwinsta
set /p id=Enter Session ID:
echo %id%
mstsc /shadow: /control /noconsentprompt