使用vb.net列出计算机的OU名称 [英] Listing a computers OU name using vb.net
本文介绍了使用vb.net列出计算机的OU名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找将在我的工作的网页上显示计算机OU名称的代码.该网页是一个ASP.net页.加载页面后,此信息将显示在屏幕上.
设置 objSysInfo = CreateObject(" )
strComputer = objSysInfo.ComputerName
设置 objComputer = GetObject(" & strComputer)
arrOUs = Split(objComputer.Parent," )
arrMainOU = Split(arrOUs( 0 )," )
Wscript.Echo arrMainOU( 1 )
I''m looking for code that will display the computers OU name on a webpage for my job. The webpage is an ASP.net page. This infomation will be display on the screen after the page is loaded.
解决方案
Here is the reference code:
Set objSysInfo = CreateObject("ADSystemInfo") strComputer = objSysInfo.ComputerName Set objComputer = GetObject("LDAP://" & strComputer) arrOUs = Split(objComputer.Parent, ",") arrMainOU = Split(arrOUs(0), "=") Wscript.Echo arrMainOU(1)
这篇关于使用vb.net列出计算机的OU名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文