如何获取远程桌面客户端的IP地址? [英] How to get the IP Address of the Remote Desktop Client?

查看:949
本文介绍了如何获取远程桌面客户端的IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个脚本来记录Windows客户端的IP地址,用户从该IP地址启动了远程桌面以登录到Windows Server.如何在服务器中捕获客户端的IP地址?

I'm trying to write a script to log the IP address of the Windows client from which the user initiated Remote Desktop to log in to the Windows Server. How to capture the IP address of the client in the Server?

推荐答案

因此,您忽略了代理...

So, you ignore proxy...

  • 使用环境var:域中的CLIENTNAME,您可以将其解析回IP

没有域控制器:

  • 使用WMI脚本,您可以转到事件日志,来源:安全性,查找登录/注销"类别,其中用户名=环境变量USERNAME

这篇关于如何获取远程桌面客户端的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆