I created a relatively complex Powershell script to manage creating new user accounts in our environment.
It handles the following:
- Highly configurable with a separate config file to customize to your site
- Creating the user in AD from a .csv file with just a few simple fields
- User settings based on a template account–you can use a template for each department
- User name and login name are automatically generated and guaranteed unique
- Generates a random passphrase from a dictionary of your choice (sample is provided)
- Setting up two network folders for the user — a U: drive and an S: drive in our environment
- Sets up AD variables that I use later for account archiving and setting defaults automatically with Group Policy for Office save locations, Outlook “home page” setting etc.
- Activating for Office 365
- Sending a welcome email message
- Some applications specific to our office:
- Activating proper permissions for Mimecast archiving
- Setting up the account for the Esquire Innovations iCreate template database
- A fair amount of error handling based on a few years of issues we ran into–handles race conditions, improper input in the names, etc.
- Output of the script is saved to a .csv file designed to be imported into KeePass.
- A moderate amount of information is logged by default