MSFN Forum: DSquery and DSmove - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

DSquery and DSmove Moving Disabled Accounts Rate Topic: -----

#1 User is offline   quinla01 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 23-February 04

Posted 06 March 2006 - 05:15 AM

Hello, I'm trying to query my active directory for disabled accounts and then move them into an OU named "disabled ou".

I've tried the following:

dsquery user -disabled | dsmove -newparent "ou=disabled group,dc=etc,dc=etc,dc=etc"

however i received the following message.

dsmove failed:`CN=blahblah,OU=Disabled group,DC=etc,DC=etc,DC=etc,'is an
unknown parameter.
type dsmove /? for help.

I cant seem to figure it out.

Andy help would be great.

Thanks

Andy


#2 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 06 March 2006 - 09:47 AM

You have to tell dsmove what you're moving. :)


dsmove "cn=disabled_account,ou=current_ou,dc=etc,dc=etc,dc=etc" -newparent "ou=Disabled Group,dc=etc,dc=etc,dc=etc"

This post has been edited by nmX.Memnoch: 06 March 2006 - 09:51 AM


#3 User is offline   quinla01 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 23-February 04

Posted 06 March 2006 - 10:19 AM

So are you telling me it is not possible to pipe the results of a dsquery command into dsmove to move multiple accounts? I have 800 account to move.

Thanks
Andy

#4 User is offline   fizban2 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,897
  • Joined: 14-April 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 06 March 2006 - 11:42 AM

dsquery user -disabled | dsmove user -newparent "ou=disabled group,dc=etc,dc=etc,dc=etc"


memnoch is right you just didn't tell it what you wanted to move but to pipe in the query, just use the user option

#5 User is offline   quinla01 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 23-February 04

Posted 06 March 2006 - 12:50 PM

Ahh, i c. I'll give it another go in the morning,

Thanks guys.

Andy

#6 User is offline   quinla01 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 23-February 04

Posted 07 March 2006 - 03:46 AM

Given it a try but it doesn't work, tell me the target is incorrect. I've heard of several people having problems piping dsmove, has anyone had any luck doing this?

Thanks

#7 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 March 2006 - 10:11 AM

It's probably the space in your OU name. Try these:

dsquery user -disabled | dsmove user -newparent ou="disabled group",dc=etc,dc=etc,dc=etc

dsquery user -disabled | dsmove user -newparent "ou='disabled group',dc=etc,dc=etc,dc=etc"


Another question...is "Disabled Group" under another OU?

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy