PSRandomUser
2.0.0
Minimum PowerShell version
5.1
Installation Options
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
- PSRandomUser.nuspec
- PSRandomUser.psd1
- PSRandomUser.psm1
- Public\New-TempADUser.ps1
- Public\New-TempADUserDetails.ps1
- Public\New-RandomUser.ps1
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 |