use Win32::OLE 'in'; $ADServer = "MyADserver"; $ADsPath = 'LDAP://'.$ADServer.'/OU=MyOU,OU=Organizations,DC=Company,DC=com'; # get ADO object, set the provider, open the connection $c = Win32::OLE->new("ADODB.Connection"); $c->{Provider} = "ADsDSOObject"; $c->Open("ADSI Provider"); die Win32::OLE->LastError() if Win32::OLE->LastError( ); #This doesnt appear to work.... $c->{Properties}->{"Size Limit"} = 100000; $c->{Properties}->{"Page size"} = 100000; # prepare and then execute the query $rs = $c->Execute("<$ADsPath>;(objectClass=Computer);Name;SubTree"); die Win32::OLE->LastError() if Win32::OLE->LastError( ); until ($rs->EOF){ print $rs->Fields(0)->{Value},"\n"; $cnt++; $rs->MoveNext; } $rs->Close; $c->Close; print "\n"; print "Total : $cnt\n";