Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New-RandomADUser

PSGallery Version PSGallery Downloads PowerShell PSGallery Platform

Table of Contents

Description

This PowerShell module generates random Active Directory users. It is primarily intended for testing purposes such as:

  • Populating Active Directory with test users for performance and security testing.
  • Creating realistic user accounts for security simulations.
  • Generating sample data for development and training environments.

Features

  • Generates users with random first and last names and cryptographically secure 16-character passwords.
  • Guarantees that every generated password contains lowercase, uppercase, numeric, and special characters.
  • Ability to specify the desired target Organizational Unit (OU).
  • Supports generating multiple users and adding a prefix to their usernames.

Requirements

  • PowerShell v5.1 or later: The module leverages PowerShell's Active Directory cmdlets.
  • Active Directory Module: Ensure the Active Directory module is installed (Import-Module ActiveDirectory).
  • Permissions: The user executing the script must have appropriate permissions in Active Directory to create user accounts.

Install module from PowerShell Gallery

Install-Module -Name New-RandomADUser

Usage and Examples

Create a random User account in the lab.local domain in the Test OU

New-RandomADUser -Domain lab.local -OU "OU=Test,DC=lab,DC=local"

Create 100 random User accounts in the lab.local domain with a prefix of tst

New-RandomADUser -Domain lab.local -OU "OU=Test,DC=lab,DC=local" -Count 100 -Prefix "tst-"

Contributing

Contributions are welcome! Please submit issues and pull requests to the GitHub repository.

License

This module is licensed under the MIT License.

About

A PowerShell module that generates random Active Directory users for testing purposes

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages