Professional Documents
Culture Documents
AWS Security Blog Search the Security Blog
AWS Directory Service allows you to create a standalone, highly available AWS-managed directory called Simple AD in a Other AWS blogs
matter of minutes. With Simple AD, you can centrally manage user accounts and group memberships for Amazon EC2
The Official AWS Blog
instances joined to a domain. It also allows you to use a single set of credentials to log in across all EC2 instances as well
as provide authentication to your applications. For more information about Simple AD, see What is AWS Directory Service Amazon SES
Simple AD?
AWS Architecture
In this blog post, I will talk about the commands to use when migrating identities from a directory such as Microsoft Active
AWS Big Data
Directory to Simple AD.
Important note: Before making changes to your Simple AD directory, it is important to keep snapshots as a backup. If you AWS Blog (Brazil)
need to create a snapshot of your directory now, follow these instructions. AWS Blog (China)
Step 1: Install AD DS tools in order to use csvde AWS Database Blog
Ensure that you have an EC2 Windows instance that is joined to the Simple AD (follow these instructions, if you need to AWS DevOps Blog
perform a join first). Log in with a user that has the ability to install roles or features on the Windows instance, and create
AWS for SAP Blog
objects in the domain such as the Administrator account. You’ll need to run the command in this step on the EC2
Windows instance that you’ve set up. Your existing Active Directory should have the tools installed already, but you can AWS Internet of Things Blog
run the same command if the tools do not appear.
AWS Java Development
Open Windows PowerShell and run one of the following two commands to get the Active Directory tools that include
AWS Mobile Development
csvde.
AWS .NET Development
Use the following command for Windows Server 2008 R2.
AWS Partner Network
> Add-WindowsFeature RSAT-ADDS-Tools
AWS PHP Development
Feedback
Step 2: Export identities from your existing Active Directory (or Simple AD)
Run the following command from your Domain Controller running Active Directory to export your user identities to a file. Comments? Questions? Send us
feedback
> csvde -f users.csv -l "DN, objectclass, objectcategory, givenName, sn, name, samAccou
ntName, displayname" -r "(&(objectClass=user)(objectCategory=person))" RSS Feed
Copy the users.csv file to the EC2 instance that is joined to the Simple AD. Before importing the identities, open the
users.csv file and review the content. You can remove lines for the users such as Administrator, Guest, and krbtgt,
because they already exist by default in all directories. Only keep the lines for the users that you wish to exist in the new
directory. If you are also importing the identities into a domain with a different domain name, you will need to update
values such as dn and objectCategory for the new domain name, because they have references to them.
The following sample shows a .csv file with one user account.
DN,objectClass,name,sAMAccountName,objectCategory,displayName,givenName,
sn,userPrincipalName
https://aws.amazon.com/blogs/security/how-to-migrate-your-microsoft-active-directory-users-to-simple-ad/ 1/3
2/2/2017 How to Migrate Your Microsoft Active Directory Users to Simple AD | AWS Security Blog
"CN=John Doe,CN=Users,DC=example,DC=com",user,John Doe,johndoe,"CN=Person,CN=Schema,CN=
Configuration,DC=example,DC=com",John Doe,John,Doe,johndoe@example.com
Enter the following command on the EC2 instance that is joined to the Simple AD to import users from the .csv file.
After the users have been imported, they will be disabled and require a password. You can install the Active Directory
Administration Tools and run the Active Directory Users and Computers tool on the EC2 instance that you launched to
enable the account and create a new password. You should always use long and complex values for your passwords.
Conclusion
This post has shown you how to easily migrate existing identities in your Active Directory to a Simple AD by using the
csvde tool. Using this tool also allows you to perform a bulk import of your identities. With the ability to quickly create
Simple AD directories in a matter of minutes and create a copy of all your identities, you can start to establish an
environment that is similar to your current setup.
You can post comments below, or visit the AWS Directory Service forum to post comments and questions.
– Chen
TAGS: Amazon EC2, csvde, Directory Service, Simple AD, Windows PowerShell
View Comments
AWS on Twitter AWS on Facebook AWS on Google+ AWS Blog What's New? RSS
Solutions
Websites & Website Hosting
Business Applications
Backup & Recovery
Disaster Recovery
Data Archive
DevOps
Big Data
High Performance Computing
Mobile Services
Digital Marketing
Game Development
Digital Media
Government & Education
Health
Financial Services
Windows on AWS
https://aws.amazon.com/blogs/security/how-to-migrate-your-microsoft-active-directory-users-to-simple-ad/ 2/3
2/2/2017 How to Migrate Your Microsoft Active Directory Users to Simple AD | AWS Security Blog
Resources & Training
Developers
Java on AWS
JavaScript on AWS
Mobile on AWS
PHP on AWS
Python on AWS
Ruby on AWS
Windows & .NET on AWS
SDKs & Tools
AWS Marketplace
User Groups
Support Plans
Service Health Dashboard
Discussion Forums
FAQs
Documentation
Articles & Tutorials
Test Drives
AWS Business Builder
Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring Software Development Engineers, Product Managers, Account
Managers, Solutions Architects, Support Engineers, System Engineers, Designers and more. Visit our Careers page or our Developer-specific Careers page to learn more.
Language Deutsch English Español Français Italiano Português Ρусский ⽇本語 한국어 中⽂ (简体) 中⽂ (繁體)
https://aws.amazon.com/blogs/security/how-to-migrate-your-microsoft-active-directory-users-to-simple-ad/ 3/3