PSRandomUser

2.0.0

The PSRandomUser Module enables you to create random user accounts. This module can be used to create random user accounts for testing purposes. Commands included enable the easy creation of Temporary Active Directory user accounts. This module is not intended for use in production environments. The AD-related functions (New-TempADUser, New-TempADUserDetails -Path ...
The PSRandomUser Module enables you to create random user accounts. This module can be used to create random user accounts for testing purposes. Commands included enable the easy creation of Temporary Active Directory user accounts. This module is not intended for use in production environments. The AD-related functions (New-TempADUser, New-TempADUserDetails -Path ...) additionally require the ActiveDirectory RSAT module to be installed on the host.
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PSRandomUser

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PSRandomUser

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Luke Leigh. All rights reserved.

Package Details

Author(s)

  • Luke Leigh

Tags

RandomUsers PowerShell TestAccount Test ActiveDirectory Accounts User

Functions

New-RandomUser New-TempADUserDetails New-TempADUser

Dependencies

This module has no dependencies.

Release Notes

2.0.0
 - BREAKING: New-RandomUser.Country now returns the ISO-3166 two-letter code (was: full country name).
   The full name is available on the new CountryName property. New-TempADUserDetails also gains
   CountryName for parity.
 - New-TempADUser now honours -WhatIf / -Confirm (real ShouldProcess), uses its declared parameters
   (no longer reads from $_), defers Get-ADDomain resolution to runtime, and surfaces errors via
   WriteError instead of swallowing them.
 - SamAccountName is sanitised to ^[a-z0-9]{1,20}$ with NFD diacritic stripping.
 - UserPrincipalName is lower-cased consistently in both generators.
 - PowerShellVersion pinned to 5.1; manifest exports are explicit.
 - Module rebuild script (CreateModuleScriptFile.ps1) is now idempotent and uses $PSScriptRoot.
 - Adds Pester v5 test suite, PSScriptAnalyzerSettings.psd1, and a GitHub Actions CI workflow.

FileList

Version History

Version Downloads Last updated
2.0.0 (current version) 5 6/20/2026
1.0.0 4,090 5/27/2022
0.0.1 28 5/24/2022