Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

APPENDIX A: Solutions to Exercises > Solution 8: Populate an Active Directory T...

Solution 8: Populate an Active Directory Test Environment

Creating the users is straightforward, but you also have to remember the order of operations for this. Create the OU first, and then add the users. Also key to the success of this exercise is making sure you enable the recycle bin before deleting your users. Here is one example of the PowerShell commands you could run to perform the exercise. For this exercise, I used a Windows Server 2008 R2 native forest; you would replace the deploy.com with the domain you are working with:

  1. Create the OU test:
    New-ADOrganizationalUnit –Name “Test” –Path
    “DC=deploy,DC=com”
  2. Create the users:
    New-ADuser chrissmith -GivenName “Smith” - Surname
    image
    “Chris” -Displayname “Chris Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser sarahsmith -GivenName “Smith” - Surname
    image
    “Sarah” -Displayname “Sarah Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser kevinsmith -GivenName “Smith” - Surname
    image
    “Kevin” -Displayname “Kevin Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser debsmith -GivenName “Smith” - Surname
    image
    “Deb” -Displayname “Deb Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser caitlinsmith -GivenName “Smith” - Surname
    image
    “Caitlin” -Displayname “Caitlin Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser mitchellsmith -GivenName “Smith” - Surname
    image
    “Mitchell” -Displayname “Mitchell Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser nicolesmith -GivenName “Smith” - Surname
    image
    “Nicole” -Displayname “Nicole Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser mattsmith -GivenName “Smith” - Surname
    image
    “Matt” -Displayname “Matt Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’
    
    New-ADuser billsmith -GivenName “Smith” - Surname
    image
    “Bill” -Displayname “Bill Smith” -Path
    image
    ‘OU=test,DC=deploy,DC=com’

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint