PaulDotCom mailing list archives
Re: mass user creation on 2008 then enumeration
From: Barry Von Ahsen <barry () vonahsen com>
Date: Tue, 30 Apr 2013 19:42:33 -0500
On Apr 30, 2013, at 10:48 AM, Robin Wood wrote:
I'm setting up a lab for some training I've got and I need to set up a bunch of users on my 2008 DC. I know there are scripts to do this but can't find any, has anyone got a good one?
I wrote this powershell to mass change passwords, set-aduser should change to new-aduser pretty directly. logins.txt is just a username,password CSV file (with username,password as the header) $inputfile = ".\logins.txt" $data = import-csv $inputfile foreach ($user in $data) { $pass = ConvertTo-SecureString $user.password -AsPlainText –Force $user = $user.username write-host creating $user set-aduser -identity $user -AccountPassword $pass -CannotChangePassword $true -PasswordNeverExpires $true } -barry _______________________________________________ Pauldotcom mailing list Pauldotcom () mail pauldotcom com http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom Main Web Site: http://pauldotcom.com
Current thread:
- mass user creation on 2008 then enumeration Robin Wood (Apr 30)
- Re: mass user creation on 2008 then enumeration Michael Allen (Apr 30)
- Re: mass user creation on 2008 then enumeration Michael Allen (Apr 30)
- Re: mass user creation on 2008 then enumeration Barry Von Ahsen (Apr 30)
- Re: mass user creation on 2008 then enumeration Carlos Perez (Apr 30)
- Re: mass user creation on 2008 then enumeration Ryan B (Apr 30)
- Re: mass user creation on 2008 then enumeration Tony Turner (Apr 30)
- Re: mass user creation on 2008 then enumeration S. White (Apr 30)
- Re: mass user creation on 2008 then enumeration Robin Wood (Apr 30)
- Re: mass user creation on 2008 then enumeration ben smith (May 01)
- Re: mass user creation on 2008 then enumeration Robin Wood (May 02)
- Re: mass user creation on 2008 then enumeration Robin Wood (Apr 30)
- Re: mass user creation on 2008 then enumeration Michael Allen (Apr 30)