如何判断用户是通过AD还是本地帐户登录? [英] How can I tell if a User logged in through AD or a Local account?

查看:260
本文介绍了如何判断用户是通过AD还是本地帐户登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试确定用户是通过本地帐户还是通过Active Directory登录。我知道我可以尝试访问域控制器并捕获异常,如果它是本地的,但是必须有一些方法来查询它。



谢谢你,

Glenn

Hi,

I'm trying to determine if a user has logged in through a local account or through Active Directory. I know I can try and access the domain controller and trap an exception if it's local, however there must be some way to just query this.

Thank you,
Glenn

推荐答案

请尝试使用WMI Query.Hope它确实...



http://blogs.msdn.com/b/alejacma/archive/2008/03/04/how-to-get-the-logged-on-user-with-wmi-vbscript.aspx [ ^ ]
Please Try with WMI Query.Hope it does...

http://blogs.msdn.com/b/alejacma/archive/2008/03/04/how-to-get-the-logged-on-user-with-wmi-vbscript.aspx[^]


这篇关于如何判断用户是通过AD还是本地帐户登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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