O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating user accounts: step-by-step exercises

In this exercise, you will explore the use of Windows PowerShell to create several users whose names are contained in a text file. Once these user accounts are created, you will use Windows PowerShell to enable message tracking on an Exchange server.

Parsing a text file and creating Exchange user accounts

  1. Open the Windows PowerShell ISE or some other Windows PowerShell script editor.

  2. Create a UserNames.txt file, and ensure you have access to the path to this file. The file contains a listing of users’ first and last names. A sample format for this file is shown here:

    Chuck,Adams
    Alice,Jones
    Bob,Dentworth
  3. On the first line of your script, create a variable called $aryUsers to hold the array of text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required