如何使用c#获取域中当前连接的系统 [英] How to get currently connected systems in a domain using c#

查看:79
本文介绍了如何使用c#获取域中当前连接的系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我想了解使用c#的网络中当前在线系统的详细信息。我们的机器通过Windows Server 2012连接。如何实现这一目标?有人指导,如果我错了?该程序将在Server机器上运行。

Hi Everyone!

I want the details of currently online systems in a network using c#. Our machines connected through Windows Server 2012. How to achieve this goal ? someone guide if I am wrong? This program going to run on Server machine.

推荐答案

根据您是在编写企业应用程序还是仅供您使用的东西,这可能很容易或非常耗时。



有像SCOM这样的监控解决方案可以发现和收集各种机器的信息。



如果你正在编写自己的应用程序然后你应该想到某些事情:



1.认证

2.通信(无代理或基于代理的,协议WMI / Powershell /等。)



对于小型应用程序,我建议使用远程PowerShell。以下链接有一个powershell脚本,用于从计算机登录用户信息。



https://gallery.technet.microsoft.com/scriptcenter/d46b1f3b-36a4-4a56-951b-e37815a2df0c [ ^ ]
This could be easy or significantly time consuming based on whether you are writing an enterprise application or something just for your use.

There are monitoring solutions available like SCOM which can discover and collect information from various machines.

If you are writing your own app then you should think of certain things:

1. Authentication
2. Communication (agentless or agent based and, protocol WMI/Powershell/etc.)

For a small application, I'd suggest using remote powershell. The following link has a powershell script for getting logged on user information from machine.

https://gallery.technet.microsoft.com/scriptcenter/d46b1f3b-36a4-4a56-951b-e37815a2df0c[^]


这篇关于如何使用c#获取域中当前连接的系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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