Book Image

Windows Server 2012 R2 Administrator Cookbook

By : Jordan Krause
Book Image

Windows Server 2012 R2 Administrator Cookbook

By: Jordan Krause

Overview of this book

Table of Contents (17 chapters)
Windows Server 2012 R2 Administrator Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using PowerShell to create a new Active Directory user


Creating new user accounts in Active Directory is pretty standard stuff, but doing it the traditional way requires a lot of mouse clicks. Since we know that PowerShell can be used to accomplish anything within Windows Server 2012 R2, but not many people actually employ it regularly, let's use this common task as a recipe to be accomplished with PowerShell rather than the GUI.

Getting ready

We will use PowerShell on our Windows Server 2012 R2 Domain Controller in order to create this new user account.

How to do it...

Follow along to create a new user account in Active Directory by using the PowerShell command prompt:

  1. Launch a PowerShell command prompt as an Administrator.

  2. Enter the following command in order to create a new user account with very simple parameters:

    New-ADUser –Name "John Smith" –UserPrincipalName "[email protected]" –SamAccountName "jsmith"
    
  3. If you open up the GUI for Active Directory Users and Computers, you will see that...