just devide the line:
Code:

$objDomain = GetObject("LDAP://" + GetObject("LDAP://rootDSE").Get("defaultNamingContext"))



to search the error:
Code:

$rootDSE = GetObject("LDAP://rootDSE")
@error ?
$defaultNamingContext = $rootDSE.Get("defaultNamingContext")
@error ?
$objDomain = GetObject("LDAP://" + $defaultNamingContext)
@error ?

_________________________
!

download KiXnet