Create Random .CSV data

Hi Experts,

I have a strange request. I am building a test Exchange 2007 environment and I want to manage large numbers of accounts. Does anyone know of any template .CSV files I can download that contain user names and email addresses that I can import into Exchange?
I would like to have hundreds or even thousands of accounts. Otherwise is there a way to generate this data through Excel or via scripts?

Thanks in advance
LVL 12
nealerocksAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shauncroucherCommented:
Hi,

I have a CSV I created whilst testing bulk management using powershell.

Attached is the CSV. Put this in same directory where you run the following command and it will create a whole load of unique users (250 for this CSV) and puts them in the Mailbox Database called 'Mailbox Database' (change this if yours is different). Organisational Unit Users (change if you prefer somewhere else).  

I used Excel to create the CSV.

Import-Csv recipients.csv | foreach { $Password = ConvertTo-SecureString $_.password -asplaintext -force;$UPN = $_.UPN+$_.Domain; New-Mailbox alias $_.Alias name $_.Name -FirstName $_.FirstName -LastName $_.LastName UserPrincipalName $UPN Database mailbox database OrganizationalUnit Users Password $Password}


recipients.csv
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shauncroucherCommented:
Posting that changed hyphen to !!
I'll try that again.

Command:

Import-Csv recipients.csv | foreach { $Password = ConvertTo-SecureString $_.password -asplaintext -force;$UPN = $_.UPN+$_.Domain; New-Mailbox alias $_.Alias name $_.Name -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $UPN Database mailbox database -OrganizationalUnit Users -Password $Password}

0
shauncroucherCommented:
I don't know why hyphens are being turned into double exclamation marks here. Sorry.

One more go:

Import-Csv recipients.csv | foreach { $Password = ConvertTo-SecureString $_.password -asplaintext -force;$UPN = $_.UPN+$_.Domain; New-Mailbox -alias $_.Alias -name $_.Name -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $UPN -Database mailbox database -OrganizationalUnit Users -Password $Password}

0
shauncroucherCommented:
Right, I haven't attached code on here before except simple Powershell commands.

This is the full command you need with the CSV. Ignore all others.

Shaun
Import-Csv recipients.csv | foreach { $Password = ConvertTo-SecureString $_.password -asplaintext -force;$UPN = $_.UPN+$_.Domain; New-Mailbox -alias $_.Alias -name $_.Name -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $UPN -Database "mailbox database" -OrganizationalUnit Users -Password $Password}

Open in new window

0
nealerocksAuthor Commented:
Thats awesome thanks!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.