Link to home
Start Free TrialLog in
Avatar of rbollinger1212
rbollinger1212

asked on

DSQUERY, DSMOVE, Active Directory, Windows 2003.

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.
Avatar of Malli Boppe
Malli Boppe
Flag of Australia image

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
Avatar of rbollinger1212
rbollinger1212

ASKER

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
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.
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"
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
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial