Do you have specific complexity requirements? Do you just need a unique password per account that is populated within your CSV?
Enter something like P@ssword!001 in the first row, then drag it down so excel will increment the last number: P@ssword!001 P@ssword!002 P@ssword!003 etc... If you want truly random passwords, you can include logic in your script to create a random password per account. I have a script to create complex random passwords using a couple of methods. Here's an example with a length requirement of 25 characters: $randombytes = New-Object byte[] 15 (New-Object System.Security.Cryptography.RNGCryptoServiceProvider).GetBytes($randombytes) $pass = [System.Convert]::ToBase64String($randombytes) $a = ([char[]](Get-Random -Input (33..47) -Count 3)) -Join '' $b = ([char[]](Get-Random -Input (48..57) -Count 2)) -Join '' $password = $pass + $a + $b Write the value of $password along with the $user to a log file. - Sean On Tue, Jun 28, 2016 at 8:48 AM, Christopher Bodnar < [email protected]> wrote: > Are you looking to programmatically auto generate those passwords? Or just > a way to get 300 at a time that you manually add to the CSV file? > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *geoff_taylor geoff_taylor > *Sent:* Tuesday, June 28, 2016 11:29 AM > *To:* ntsysadm <[email protected]>; Christopher Baio < > [email protected]> > *Subject:* Re: [NTSysADM] Create random password > > > > If read you correctly you already have a script that pulls from a csv. > You could just add a new column to the csv and pre-populate that with > randomly generated passwords in your favourite spreadsheet program, then > modify your script to pull that in as well. Lots of random password > formulas for spreadsheets on the web. > > gt > > ---------- Original Message ---------- > From: Christopher Baio <[email protected]> > Date: June 28, 2016 at 10:35 AM > > I have a powershell script to create user accounts in a specific OU that > will pull from a .csv. That script sets variables for the user, one of > them being a password that you specify in the script. What I need to do is > use a script to create the 300 users, but have a different password for > each user. > > We have a naming convention for the password; just trying to figure out > the best way to do this. Any suggestions? > > Thanks > > - Chris > > > > > ------------------------------ > ----------------------------------------- This message, and any > attachments to it, may contain information that is privileged, > confidential, and exempt from disclosure under applicable law. If the > reader of this message is not the intended recipient, you are notified that > any use, dissemination, distribution, copying, or communication of this > message is strictly prohibited. If you have received this message in error, > please notify the sender immediately by return e-mail and delete the > message and any attachments. Thank you. > >

