May 2007
Beginner
320 pages
8h 23m
English
In this exercise, we will explore the use of Windows PowerShell to create several users whose names are contained in a text file.
Open Notepad or some other Windows PowerShell script editor.
Locate the 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 from this file is shown here:
Chuck,Adams Alice,Jones Bob,Dentworth
On the first line of your script, create a variable called $aryUsers to hold the array of text that is returned by using the Get-Content cmdlet to read a text file that contains various user first names and last names. Make sure you edit the string that gets supplied to the path argument of the
Read now
Unlock full access