Kix lookup OU

$objsysinfo = createobject"ADSystemInfo")
? "User Name: " + $objsysinfo.username
? "Computer: " + $objsysinfo.computername

if instr($objsysinfo.computername, "OU="+"Computer") and instr($objsysinfo.computername, "OU="+"ABCComputer")
? "Match."
endif

Screen
User Name: CN=TestUser,CN=Users,DC=domain,DC=com
Computer: CN=PC1,OU=Computer,OU=ABCComputer,DC,domain,DC=com

Comments

No comments yet. Why don’t you start the discussion?

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

*