dsquery -limit command not working
As my title says I’m facing some problem with dsquery -limit command. I wanted to know return more than 100 results from AD. For doing the same I used the following command:
Quote:
dsquery user OU=_Users,OU=DCA,OU=Locations,DC=sm,DC=doi,DC=net –limit 300 |
dsget user -dn -desc -profile -hmdir -loscr > adusersv3.txt
But I guess I’m making some mistake due to which it keeps on giving me the following error message:
“dsquery failed:`-limit' is an unknown parameter.
type dsquery /? for help.dsget failed:`Target object for this command' is missing.”
So I request you people to please help me out and let me know the proper method.
Thank you very much.
Re: dsquery -limit command not working
I appreciate your help Janos. But can you please be more specific what exactly you mean by "similar user name". However I changed the limit to 200 and still get the same error.Thanks again.
Re: dsquery -limit command not working
I know what you are doing wrong. It is the syntax that is incorrect. To keep it simple, if you would like to list all objects in Active Directory, use the following:
Code:
dsquery * -limit 10000
You have to give the amount to limit the search by. I believe you are using the following syntax instead...
You can modify as needed to suit your needs.