Link to home
Create AccountLog in
Avatar of DRRAM
DRRAM

asked on

DISABLE LISTE USERS

please How can I DISABLE the list of users in active directory  AND MODIFY THE DESCRIPTION
Avatar of chompishk
chompishk

Right click on the user and click Disable.

If you have a 2008 DFL you can do this on multiple users by Ctrl Click then right click. Not 100% if you can do it on anything under a 2008 DFL however
Avatar of DRRAM

ASKER

it is not a good idea please I can a script to disable a liste of users and also change the descriptions
If the users are in different OU's or you want to process a large number of users from a text file, this can be done via vbscript. Let me know if that is what you require and I'll throw one together for you, otherwise Chompishk's suggestion is spot on.
Avatar of DRRAM

ASKER

yes Scottyworld it is the required idea but also please I want to add at the end of the description tag the date of the disabled user
THX  
ASKER CERTIFIED SOLUTION
Avatar of Scottyworld
Scottyworld
Flag of New Zealand image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of DRRAM

ASKER

thx very much " Scottyworld" please
To disable the pcs I can use the same code
how I can adapt this code
thx
no worries....

Unless you're worried about naming (struser instead of strComputer) then all you need to do is change line 14 of the above code to the following :
 
ldapStr = "<LDAP://" & rootDSE.Get("defaultNamingContext") & ">;(&(objectCategory=computer)(objectClass=computer)(cn=" & strUser & "));ADsPath,description;subtree"

Open in new window

Resolved !!

Please remember to assign points and close questions once you are happy with the answer
Thanks,
Scotty
Avatar of DRRAM

ASKER

THX IT IS A GOOD SUPPORT