Created
September 19, 2022 04:21
-
-
Save tknhs/449ae1ef10cfce363093b0df561fabae to your computer and use it in GitHub Desktop.
セッションを別ユーザに渡す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
cd %~dp0 | |
for /f "usebackq tokens=4*" %%a in (`tasklist /v ^| findstr RDP`) do ( | |
set SessionNumber=%%a | |
) | |
tscon !SessionNumber! /dest:console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment