如何将VB项目连接到活动目录? [英] How do I connect my VB project to active directory?

查看:114
本文介绍了如何将VB项目连接到活动目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为IT部门创建一个VB项目,以便在有人输入PC或笔记本电脑资产编号时,这将查询Active Directory并使用当前登录的用户/操作系统安装/和Active Directory报告对象所在的OU。



我尝试过:



目前我只绘制了GUI的一部分,并编写了一些基本代码,其中包含一个复选框,需要勾选该复选框以启用一些按钮,以强制重启/关闭资产。自从我玩VB以来已经有很多(至少10年)了,所以我再次感受到新的领域。

I am currently creating a VB project for the IT department to use, so that if someone enters a PC or Laptop asset number, this will query Active Directory and report back with the current logged on user / OS installed / and Active Directory OU that the object sits in.

What I have tried:

At present I have only drawn up the GUI side of things and written some of the basic code featuing a check box which needs to be ticked to enable a couple of buttons to work featuring a force restart / shut down of the asset. It's been many many (at least 10) years since I played with VB so it's feeling in areas new again for me.

推荐答案

假设你的意思是VB.NET,你可以使用 System.DirectoryServices [ ^ ]用于查询和更新Active Directory的程序集/命名空间。



此站点上有很多示例;例如:使用.NET类和LDAP查询查询Active Directory [ ^ ]





如果您的意思是VB6或更早版本,则需要使用ADSI:使用Visual Basic(Windows)访问Active Directory [ ^ ]



注意:你很难找到对VB6的支持,因为它已经死了超过10年。
Assuming you mean VB.NET, you can use the System.DirectoryServices[^] assembly / namespace to query and update Active Directory.

There are lots of examples on this site; for example: Querying Active Directory using .NET classes and LDAP queries[^]


If you meant VB6 or earlier, you'd need to use ADSI: Accessing Active Directory Using Visual Basic (Windows)[^]

NB: You'll struggle to find support for VB6, since it's been dead for over 10 years.


这篇关于如何将VB项目连接到活动目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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