You have to pass userAccountControl over because uacSet:2 is actually doing an 
OR - (userAccountrControl OR 2) => userAccountControl. I imagine you should be 
able to do the move in the same operation. 

Does your CSV have a list of DNs? I believe you would actually want to use the 
CSV input mode in admod and pipe in that CSV file rather than using adfind. 
There's an example in the help. 

Thanks,
Brian Desmond
br...@briandesmond.com

c   - 312.731.3132


-----Original Message-----
From: Mike Leone [mailto:oozerd...@gmail.com] 
Sent: Monday, November 15, 2010 11:21 AM
To: NT System Admin Issues
Subject: Disabling a large number of computer accounts at once - ADMOD?

I have a CSV file of computer accounts that I need to set to DISABLED in AD, 
and move to a "Disabled" OU. My thinking is that I should probably be able to 
do that with ADFIND and ADMOD.

But I have 2 questions:

1. The example has:

adfind -default -f "&(samaccounttype=805306368)(name=joe)"
useraccountcontrol -adcsv
          | admod -sc uacset:2

and I'm not sure why I would need to pass "useraccountcontrol" over to ADMOD.

(in my case, since they are all computer accounts, I can use

adfind -default -f "&(objectcategory=computer)(name=-my-names-)"
useraccountcontrol


2. I should be able to disable and move, all in one ADMOD operation?

| admod -sc uacset:2 -move ou=DISABLED,dc=-etc-etc-etc

Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to