Ok now that we have a Windows Server 2019 with Active Directory setup we can populate Active Directory with random users. If you need help create a Windows Server 2019 with Active Directory visit Build a Windows Server 2019 Active Directory VM on VMware Fusion 11For Your Lab blog post.
Search for Powershell ISE
Right Click on Windows PowerShell ISE and
Click on Run as administrator
Copy and past the Get-RandomUser function into the Shell
Press Enter
The Get-RandomUser function will now be loaded
Once you have the Get-RandomUser function loaded you can run the below script.
Script Task:
-Create Security Group OU if missing
-Create Staging Users OU if missing
-Create test-staff security group if missing in Security Group OU
-Create test-engineering security group if missing in Security Group OU
-Create test-finance security group if missing in Security Group OU
-Create test-hr security group if missing in Security Group OU
-Create test-it security group if missing in Security Group OU
-Create test-legal security group if missing in Security Group OU
-Create test-marketing security group if missing in Security Group OU
-Create test-operations security group if missing in Security Group OU
-Create test-sales security group if missing in Security Group OU
-Create test-support security group if missing in Security Group OU
-Once all accounts are created Export all the users account information to a .csv file on the current users desktop.
The first line of the code "$StagingUsers = Get-RandomUser -Mode StaffandEmployees -NumberofUsers 100" feel free to change 100 to any number of users. I think 100 user accounts should be fine for the test environment.
Comments