RE: unlock user accounts en masse
Tech-Archive recommends: Speed Up your PC by fixing your registry
- From: "Randy stuartsdesigns com>" <randy<atdot>
- Date: Wed, 25 May 2005 07:30:08 -0700
Well, this is not really scripting, but it is what I use to work with a lot
of accounts at once.
On the Domain controler open the comand promt and run a dsquery on the OU
that you want to modify then pip that output to a dsmod comand to activate
those users.
For example
dsquery user "ou=Technology Staff,dc=mydomain,dc=com" | dsmod user -disabled
no
this would activate all the users in the Technology Staff OU.
I hope that helps
--
Randy <><
http://www.stuartsdesigns.com
"Sam B." wrote:
> I've seen the syntax on unlocking a user account, but is there a way to
> enumerate the list of users in a given container/OU and then incrementally
> unlock the accounts? I've done some digging around and haven't found pieces
> that I could get to work together.
>
> If it's not possible, I'd like to know that, too.
>
>
>
.
Relevant Pages
- Anonymous Logon can READ S.A.M. in NT4 Server
... I am tired of unlocking my accounts because a "poker" can ... read my user names on my NT4 server and then try to guess ... then take the list and try to guess passwords. ... (microsoft.public.security) - Re: Display last login for user accounts
... > directory domain and the last time it was logged in. ... > accounts of past ex-employees. ... And if your domain functional level has been set to Windows Server 2003: ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ... (microsoft.public.windows.server.scripting) - Re: UserAccountControl
... The accounts are currently disabled ... userAccountControl attribute is not supported by Active Directory ... What you can do to expire the password is setting the pwdLastSet ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ... (microsoft.public.scripting.vbscript) - Re: UserAccountControl
... > Bart Perrier wrote: ... >> I am needing to set a large number of user accounts in an OU to prompt ... The accounts are currently ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ... (microsoft.public.scripting.vbscript) - Re: Forgotten Password
... > don't have a reset disk. ... > through the limited accounts, but it won't let me, saying ... you might try to reset the local Administrator ... Microsoft MVP Scripting and WMI, ... (microsoft.public.windowsxp.general) |
|