LoginSignup
4
3

More than 5 years have passed since last update.

リモートディスクトップの接続元ユーザー名を取得する方法

Posted at

リモートディスクトップでマシンの奪い合いを防ぐため、ログイン・ログアウトをSlack通知するBotを作成しようとしたときに必要になったのでメモ。

%CLIENTNAME%

環境変数「CLIENTNAME」を参照すればおっけー。

確認

cmd
C:\Windows\system32>echo %CLIENTNAME%
daikingca2
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3