Enumerating the default computers container may not show you what you want to know if your computers are not located there. I would suggest using the TranslateName() UDF to explicitly lookup your server names and display the distinguishedName or canonical name to see where they are located in the OU structure.

 Code:
$NameArray = TranslateName (1, @LDomain, 3, @Domain + "\" + @wksta + "$", "1,2")
if @error=0
	$WkstaDN            = $NameArray[1]
	$WkstaCanonicalname = $NameArray[2]
endif


you can get the UDF in the UDF library.


Edited by Howard Bullock (2014-02-05 04:58 PM)
_________________________
Home page: http://www.kixhelp.com/hb/