We help IT Professionals succeed at work.

DSQUERY, DSMOVE, Active Directory, Windows 2003.

4,710 Views
Last Modified: 2010-07-22
A question regarding dsquery and dsmove here is my command:

C:\>dsquery user OU=bleepoff,dc=smallbusiness,dc=local |dsmove -newparent "ou=mov
edhere,dc=smallbusiness,dc=local"

Which returnes this:

Dsquery has reached the default limit of 100 results to display; use the -limit
option to display more results.dsmove failed:`CN=MyUser205,OU=bleepoff,DC=smallbu
siness,DC=local' is an unknown parameter.
type dsmove /? for help.
C:\>

The command total:

C:\>dsquery user OU=bleepoff,dc=smallbusiness,dc=local |dsmove -newparent "ou=mov
edhere,dc=smallbusiness,dc=local"
Dsquery has reached the default limit of 100 results to display; use the -limit
option to display more results.dsmove failed:`CN=MyUser205,OU=bleepoff,DC=smallbu
siness,DC=local' is an unknown parameter.
type dsmove /? for help.
C:\>

If i run that same command but type: cn=myuser203 (then the rest of the command) it works perfectly. I just cannot seem to get it to move a group of accounts.
Comment
Watch Question

CERTIFIED EXPERT

Commented:
I think their a limitation on number of objects that you can query from the DC in a single go.This has been done purposefully keeping mind about the performance of the DC.Below article is somewhat similar to your situation.But I wouldn't recommend you to change the registry
http://support.microsoft.com/kb/262848

Author

Commented:
C:\>dsquery user OU=bleepoff,dc=smallbusiness,dc=local -limit 1000 |dsmove  -newparent "ou=movedhere,dc=smallbusiness,dc=local"
dsmove failed:`CN=MyUser205,OU=fuckoff,DC=smallbusiness,DC=local' is an unknown
parameter.
type dsmove /? for help.

Notice that i get the same error and yet i used the limit of 1000 so i dont get that error anymore. Besides i think that the command should work even if the limit is there... or at least to 100.

Robert
CERTIFIED EXPERT

Commented:
The limit that you are mentioning is in the query. But the error that you are getting is from the domain controller.
Say you are expecting a result with 90 entries then you can limit just to display 60 with the limit option in the dsquery.
Farhan KaziSystems Engineer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Do can do this three steps:

Click Start -> Run -> Cmd.exe

DSQuery user "OU=bleepoff,dc=smallbusiness,dc=local" -limit 0 >C:\UsersCN.txt

For /F "delims=$" %c in ('Type C:\UsersCN.txt') Do DSMove %c -newparent "ou=mov
edhere,dc=smallbusiness,dc=local"

Author

Commented:
Interesting... The book (the 70-290 exam book) uses that command when query computer accounts and succesfully moves them to another OU.

did i tyoe the command wrong? have i mis-understood the purpose of this command? or dare i say if i havent done anything wrong is the command wrong in the book?

does anyone have this book? this is @ objective 2.2 in the back of the book on page 15 of chapter 15
qustion number 5.

I would really appreciate any more assistance on this issue, not only do i want to properly use these commands but i dont want to get an answer wrong on my test.

Please Advise...

Thanks Robert
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.