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
(3)
1,320 times
Add to favorites
Active Directory
11/14/2018
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 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.
      
      Dennis
    • 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:
      FirstName,MiddleName,LastName
      
      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:
      
      FirstName,MiddleName,LastName
      Steve,,Rogers
      Peter,Benjamin,Parker
    • 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.
      
      FirstName,MiddleName,LastName
      Steve,,Rogers
      Peter,Benjamin,Parker
      ,Tony,Stark
      ,,Logan
      Rogue,,
      
      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?
  • Requirement of Exchange AD Schema Extension ?
    1 Posts | Last post November 14, 2018
    • Hello,
      
      Great Script ! 
      Worked fine on one lab config with AADConnect and hybrid Exchange Server 2016.
      But when I tested it on a fresh new W2016 Server - new Forest, only 1 DC without any Exchange server-, I have seen  an error on user creation, about missing MailNickName Attribute in my Active Directory.
      
      I just only wanted to create OUs/Users and Groups, no mail entries needed.
      And effectively, this new AD wasn't setuped / extended for Exchange so no mailnickname attribute. 
      
      Is it possible to :
      - add a switch like -NoExchangeSchema to remove dependances of Exchange AD Schema extension ?
      - detect automatically the Exchange AD Schema extension
      
  • Powershell v2.0
    2 Posts | Last post July 30, 2018
    • Hey Aaron, 
      
      The script bombed when running from an Exchange 2010 Server. Just needs a #requires -version 4 
      
      No issues when running from a different Server with a higher PS version and remoting to the same E2010. 
      
      Cheers
      
    • Cool. Thanks for the idea!