quinla01 Posted March 6, 2006 Posted March 6, 2006 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 anunknown parameter.type dsmove /? for help.I cant seem to figure it out.Andy help would be great.ThanksAndy
nmX.Memnoch Posted March 6, 2006 Posted March 6, 2006 (edited) 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" Edited March 6, 2006 by nmX.Memnoch
quinla01 Posted March 6, 2006 Author Posted March 6, 2006 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.ThanksAndy
fizban2 Posted March 6, 2006 Posted March 6, 2006 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
quinla01 Posted March 6, 2006 Author Posted March 6, 2006 Ahh, i c. I'll give it another go in the morning,Thanks guys.Andy
quinla01 Posted March 7, 2006 Author Posted March 7, 2006 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
nmX.Memnoch Posted March 7, 2006 Posted March 7, 2006 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=etcdsquery user -disabled | dsmove user -newparent "ou='disabled group',dc=etc,dc=etc,dc=etc"Another question...is "Disabled Group" under another OU?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now