In line with the objective of streamlining and automating new employee/user creation process for help desk/level 1 support, I wrote the following PowerShell script to help precisely define the steps in the process, further reduce the chance for human error and cut down time to finish the task.

The interactive PowerShell script accepts user input for three (3) required string parameters, the first name, last name and department. The department is selected from a GUI drop down list box. The script checks to see if the user already exists.If so, the script stops and sends a message to the console. The Active Directory account is created in a specific organizational unit based on the department selection, the account is mailbox enabled and email notification is sent to the team.

This script is an update to an earlier script. It’s designed to create one user at a time for an environment that only sets up one or two new users maybe once a week. It can be easily edited to accept multiple user values from a text file.

Ty for this script and its ideas. It works super fine and is easy to costumize – work further with.
A single comment could be that the Departmentsdropdown.txt is a plain text list where each line holds the name of a new ou. In the switch case pattern you can use “quots around long names” with spaces inside, just like normal strings.