Coder Social home page Coder Social logo

mdeora / adimporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robbridgeman/adimporter

0.0 0.0 0.0 5.1 MB

Credit to Helge Klein - https://helgeklein.com/blog/2015/02/creating-realistic-test-user-accounts-active-directory/

License: MIT License

PowerShell 100.00%

adimporter's Introduction

Credits

ADImporter

When you need to simulate a real Active Directory with thousands of users you quickly find that creating realistic test accounts is not trivial. Sure enough, you can whip up a quick PowerShell one-liner that creates any number of accounts, but what if you need real first and last names? Real (existing) addresses? Postal codes matching phone area codes? I could go on. The point is that you need two things: input files with names, addresses etc. And script logic that creates user accounts from that data. This Repo provides both.

Mission Statement

The purpose of the script is to create an arbitrary number of user accounts with the following properties:

  • Logon name (sAMAccountName)
  • User principal name (UPN)
  • Employee Number
  • First name
  • Last name
  • Display name
  • E-mail address
  • Street
  • City
  • Postal code
  • State
  • Country
  • Phone number
  • Company
  • Department
  • Title

Active directory user accounts created by the PowerShell script

Realism

In order to create realistic results we need data, lists: firstnames, surnames, addresses and a mapping between postal and phone area codes. The script CreateDemoUsers.ps1 expects separate CSV files for each of these. I have included some files with assorted information for UK addresses, and assorted nationality names.

If you want your users to “live” in another country you need to provide the lists yourself.

Using CreateDemoUsers.ps1

Running the script is simple enough: just start it, there are no commandline parameters. I have run it directly on my lab’s domain controller but it should work from a domain member, too.

Before you execute the script you might want to configure a few things, though. Take a look at the global variables section at the head of the script. There you can configure important things like how many users to create, which OU to create them in, how many different addresses to use and many other things. That section also contains the names of the data files the script requires. If you use my files you do not need to change anything, but if you create your own files you might want to make sure the file names match.

adimporter's People

Contributors

bunchc avatar khaaliturbo avatar philjones88 avatar robbridgeman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.