Thursday, May 17, 2018

Updated v2.1: Powershell Script to create New Users/OUs in New Domain with Old Domain's User/OU Info

It is the updated version [v2.1] of the script that will create users in nested OU. If you do not know how to use this script, you can see here.
I made some update changes so users 'Names' do not need to be unique in domain level but only in each OU.

Wednesday, May 2, 2018

Powershell: Create New Users/OUs in New Domain with Old Domain's User/OU Info

It has been nearly 2 years that I wrote the script to create new AD users with the automatic nested OU creation. The original idea is to create the users from the csv file in which AD users properties are defined. The script now supports extracting the current users and OU information from old domain and use in the new domain. The script will prompt for the new domain name & passwords (optional) to put in the csv file.

In this example, I will export the current users in contoso.local domain (See Fig-1) and create these users in example.local domain (See Fig-2). Since, we define the password with the script, it will use the same plain text password for all users in csv file (you can manually specify the passwords for each user)
Note: If it's a new domain, you can also maually create the csv file before users creation (see inside the script to find out which csv headers must be included).

Fig-1: Extract Current Users Properties from source domain
Fig-2: Creating New Users from the csv file in destination domain