Skip to main content

Development

How to create Windows AD test accounts with PowerShell

During the development of a new SharePoint 2013 employee portal, we had a requirement to create more than 20K testing employees’ data, which we are not going to get from the client to test the performance of several user profile related web parts. How to do it on Local Dev machines, Staging and QA environments painlessly? We created a simple PowerShell Script to do the job automatically for us.

Step 1. Google for Keywords “Random Username Generator”. You will get a list of web sites that can generate dummy usernames for you. Copy and paste it to a CSV file or just used is as simple text.

Step 2. Execute the following script with “Windows PowerShell ISE”.

create Windows AD test accounts

Now you get test accounts in your Windows Active Directory. Notice that the bottom of the scripts added the new user to the pre-defined user groups. You will need to have those groups created manually before you execute this script.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram