I'm really new to the VBscripting world, so please be gentle :) I'm trying to display the OU of a computer on a network which has 2 domains. I have a script to display the details of the local computer:
Set objSysInfo = CreateObject("ADSystemInfo")
strComputerDN = objSysInfo.ComputerName
Set objComputer = GetObject("LDAP://" & strComputerDN)
Set objNetwork = CreateObject("Wscript.Network")
Wscript.Echo objComputer.distinguishedName
But I've had no luck with displaying the same for a computer name that I enter in an InputBox. Any help will be greatly appreciated.
Cheers