Hi Shanep, I will test out your UDF tomorrow morning as its now midnight here and I need my beauty sleep. My only question at this point is why its necessary to change the script so much for the udf. We didn't need redim and ubounds and why can't we use a simple
 Code:
$Domain=@domain
GetObject("LDAP://" + $namesOfOus + "/"  + $Domain)

instead of your
 Code:
GetObject("LDAP://"+CreateObject("ADSystemInfo").ComputerName).Parent

where does this creatobject(ADSysteminfo) do?