Jeez, that's a golden oldie Allen. Six years. I do some tests and keep you informed.

My literal translation of the VBS script (does not work):
 Code:
$objConnection = CreateObject("ADODB.Connection")
$objCommand = CreateObject("ADODB.Command")
$objConnection.Provider = "ADsDSOObject"
$objConnection.Open "Active Directory Provider"
$objCommand.ActiveConnection = $objConnection

$objCommand.Properties("Page Size") = 1000
$objCommand.Properties("Searchscope") = 2

$objCommand.CommandText = "SELECT Name FROM 'LDAP://ou=some_ou,dc=subdomain,dc=domain,dc=tld' WHERE objectCategory='user'"  
$objRecordSet = $objCommand.Execute

$objRecordSet.MoveFirst
Do Until $objRecordSet.EOF
	? $objRecordSet.Fields("Name").Value
	$objRecordSet.MoveNext
Loop
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.