Create Realistic Lab Users

In testing out some of my other tools over the last few weeks, I've found it necessary to create a some test users. A lot of test users. Not a normal "a lot," either. I needed hundreds of thousands at a minimum, a million if possible, as fully fleshed-out can be. And here we are.

5 Star
4,050 times
Add to favorites
Active Directory
E-mail Twitter Digg Facebook
  • Country Locations
    1 Posts | Last post February 15, 2020
    • Can Countries be added? if so what is the syntax under Locations 
  • Exchange 2007?
    1 Posts | Last post January 30, 2020
    • Hey Aaron, does this script work on Exchange 2007? How about Windows Server 2008 SP2?
  • "Transaction failed. The server response was: 5.6.0 Invalid message content"
    1 Posts | Last post December 07, 2019
    • I've run the script with the -TheWholeShebang parameter and it fails with the error : "Transaction failed. The server response was: 5.6.0 Invalid message content". Any ideas why ? I'm using an Exchange 2016 CU14 in my lab.
  • Inflate mailboxes against already created users
    1 Posts | Last post November 02, 2019
    • I ran the script (Excellent by the way) However there was an issues with my exchange server and the transport service was broken so it errored on all of the inflates. 
      Is there a way to run inflate mailbox against all the users in the exchange environment without creating new accounts?
  • Able to add the Exchange part afterwards?
    1 Posts | Last post October 25, 2019
    • Hey Aaron.
      This is absolutely brilliant! I've created a nice fake organization around the small handfull of "Production" users I'm going to have in my org. I also did a bunch of customizing and tweaking to the OUs, locations, created fileshares, etc. But at the time I ran it, I didn't have my test Exchange 2016 system online. I had Exchange go through, and create user mailboxes when I installed it afterwards. What I'm wondering is, if it's possible to run just the mailbox permissions, and delegations stuff against the user's and mailboxes I've already created in my AD structure?
  • Emails are not being sent and getting an error in Exchange 2013
    1 Posts | Last post September 27, 2019
    • Emails are not being sent and getting an error in Exchange 2013
      Exception calling "Send" with "1" argument(s): "Transaction failed. The server response was: 5.6.0 Invalid 
      message content"
      At C:\Users\XXXXXXX.XXXXXX\Downloads\Create-LabUsers.ps1:1391 char:4
      +             $Smtp.Send($Message)
      +             ~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : SmtpException
  • Stop OU creation
    2 Posts | Last post September 11, 2019
    • How can we modify the script to prevent the OU creations? We specify a path to create the user accounts but do not want  all of the sub OUs to be created. Can we just comment out the Function Create OUs?
    • Unfortunately, the design of the tool is to create a structure.  You'd most likely cause errors if you commented out the function, and the group memberships are built and nested based on the structure of the OU.  You could move everyone afterwards.
  • Can't create Mailboxes : ExternalEmailAddress is mandatory on MailUser.
    1 Posts | Last post August 04, 2019
    • Hi Aaron, 
      Thanks for making this script real.
      I'm trying to create only a hundred users and enbale mailboxes, after running the script, 
      I get this warning before getting a user's details. 
      The script did not throw any error., my CSV file is on the right format, the 100 users are present in AD , and Exch, 
      did i miss sthg in the script ?
      The object MYLAB/SF/Washington/Finance/Bat106 L T has been corrupted, and it's in an inconsistent state. The following validation errors happened: 
      ExternalEmailAddress is mandatory on MailUser. 
      The mail contact and mail user must have a valid external e-mail address. 
  • Mailbox Inflation: 5.6.0 Errors?
    1 Posts | Last post January 08, 2019
    • Has anyone seen an error Invalid Message Content when executing the inflation? I've seen successful sends of 1 out of 4 messages running against Exchange 2013.
  • Specific Users
    7 Posts | Last post December 12, 2018
    • Hello Aaron,
      I love your script and have really enjoyed using it. I've already tried out that 'whole shebang' switch, fantastic!
      I was wondering if it's possible to allow for an input file of a specific set of users to be created. The example is that while I enjoy the bulk user objects, I do want to have a few usernames that are always in my lab so when I need a test user, I don't have to go searching. Would you be interested in accepting an input CSV as a "I'll create these users first, for the first x users, then run my randomization afterwards". I typically run my own script to create all the MCU characters (Peter Parker, Steve Rogers, etc.) prior to running your script, but it didn't make sense to have users with different levels of authenticity.
      Second thought, I haven't tested it yet, but does your script work with Office365 MSOL objects/mailboxes? Not that I'd want 50,000 licensed MSOL mailboxes, but having 50-100 that were fully inflated would be nice.
    • I've added a UserList parameter. ;-)
      You just need to specify the -UserList and a path to a CSV.  CSV must be formatted with header and contain columns:
      I've also updated the InflateMailboxes parameter to use Get-Recipient instead of Get-Mailbox, and scoped it to MailUser,SharedMailbox,RemoteUserMailbox,UserMailbox.  If you have run Enable-RemoteMailbox on an object or have just created MEU's in your on-premises environment, you'll be able to use the InflateMailboxes parameter against them.
    • Aaron - Next revision, could you add error handling for a no middle name scenario when generating from a userlist?
    • I've added that as well.  You'll still need the columns FirstName,MiddleName,LastName but if a column is blank, I'll just grab one from the $Names array that contains first names.
      Here's how a CSV might look:
    • I've also added some validation to ensure you have FirstName,MiddleName,LastName columns if you use the UserList parameter.  You don't have to have them all filled in, but they must exist.
      Any of those formats will work and the missing fields will be filled in.
    • Aaron, fantastic! I've never seen someone so responsive. Still love the script.
      Is it possible to skip the middle name entirely for the input file users? I'd like the samaccountnames to be easy to remember, and if each lab has random middle names injected I still have to look up random test accounts if I need to login as that user object.
      Thank you!
    • Any word on if there's a way to skip the middle name?
1 - 10 of 12 Items