使用vb.Net确定用户的OU [英] Determine OU of a user using vb.Net
问题描述
你好乡亲
我希望有人能帮助我.我需要一个可以传递用户名的函数,该函数返回用户所在的第一个OU.
我的广告看起来像这样:
domain.com
--- 001
-> U用户
->管理
---> < UserObject>
->金融
-> R电脑
--- 002
-> U用户
->管理
---> < UserObject>
->金融
-> R电脑
--- 003
--- 004
--- 005
所以我想知道用户是在OU 001、002还是003中.有人可以给我一个查询示例吗?
非常感谢您的帮助.
问候
rascho
Hello folks
i hope somebody can help me. I need a function which I can pass a username and the function returns the first OU in which the user is.
My AD looks like this:
domain.com
--- 001
-> U-User
--> Administration
---> <UserObject>
--> Finance
-> R-Computer
--- 002
-> U-User
--> Administration
---> <UserObject>
--> Finance
-> R-Computer
--- 003
--- 004
--- 005
so I want to know if the user is in the OU 001, 002 or 003. Can somebody give me an exemple for the query?
Thanks alot for the help.
Regards
rascho
推荐答案
CodeProject上的示例1 [^ ]
^ ]
希望对您有所帮助.
Example 1 on CodeProject[^]
Google[^]
I hope it will be helpful.
这篇关于使用vb.Net确定用户的OU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!