测试PC是否通过网络登录

发布于 2024-10-06 05:47:48 字数 229 浏览 0 评论 0原文

有没有办法使用 Perl、PS Tools 或 Autoit 通过我的网络测试 PC,看看它是否已开机并登录?

例如:

  • 脚本开始
  • 脚本测试电脑以查看其是否已开机并以用户身份登录
  • 脚本在该电脑上运行任务

A 加:

  • 如果电脑未登录和/或已关机,则返回 0
  • 返回的用户名谁登录过。

Is there any way using Perl, PS Tools, or Autoit, to test a PC, over my network, to see if it is powered on and logged in?

For example:

  • Script begins
  • Script tests pc to see if it is powered on and logged in as a user
  • Script runs a task on that pc

A Plus:

  • Return 0 if the pc is not logged in and/or powered off
  • Return the user name of who ever is logged in.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以笙箫默 2024-10-13 05:47:48
TASKLIST /S hostname /U username
TASKLIST /S hostname /U domain\username

将显示用户在计算机上运行的所有任务。如果它返回错误或没有输出,则用户未登录。否则,您将解析程序列表并自行决定这些程序是否表明用户已登录,或者只是代表他/她在后台运行一些任务。

TASKLIST /S hostname /U username
TASKLIST /S hostname /U domain\username

will show you all the tasks that a user is running on a machine. If it returns an error or no output, then the user is not logged on. Otherwise, you parse the program list and decide for yourself whether the programs indicate that the user is logged on, or there are just some tasks running in the background on his/her behalf.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文