Create New AD Users in Bulk with Password verification

More Active Directory PowerShell goodness… this time, creating Active Directory User objects in bulk using a CSV file. You will see 2 different code blocks below. The first, is as simple as you can get using minimal parameters and code. The second code block includes more parameters and addresses the issue of storing clear text passwords in the PowerShell code.

This script is functional but it could use some more development to address a couple of issues. It needs another If statement to break the scripts when the entered passwords do not meet domain complexity requirements. It’s not a huge issue but I would like to figure it out at some point. The second issue is getting passwords from the console in clear text, not -AsSecureString even though the code to create the user object converts the password to a secure string before processing the object. Again, not a huge issue, however, if we’re going through the trouble to keep the password out of the script, we might as well get that information -AsSecureString from the start.