• No results found

Task 1: Prepare the csv file

In document 20410D-ENU-TrainerHandbook (Page 181-186)

1. On LON-DC1, read the contents in E:\Labfiles\Mod04\LabUsers.ps1 to identify the header requirements for the .csv file.

2. Edit the contents in E:\Labfiles\Mod04\LabUsers.csv, and then add the appropriate header.

 Task 2: Prepare the script

1. On LON-DC1, use Windows PowerShell Integrated Scripting Environment (ISE) to modify the variables in LabUsers.ps1:

o $csvfile: E:\Labfiles\Mod04\labUsers.csv o $OU: "ou=LondonBranch,dc=adatum,dc=com" 2. Save the modified LabUsers.ps1.

3. Review the contents of the script.

Task 3: Run the script

1. On LON-DC1, open a Windows PowerShell command prompt, and then run

E:\Labfiles\Mod04\LabUsers.ps1.

2. At the Windows PowerShell prompt, use the following command to verify that the users were created: Get-ADUser -Filter * -SearchBase "ou=LondonBranch,dc=adatum,dc=com"

3. On LON-CL1, sign in as Luka with the password Pa$$w0rd.

Results: After completing this exercise, you will have used Windows PowerShell to create user accounts in

MCT USE ONL

Y. STUDENT USE PROHIBITED

4-28 Automating Active Directory Domain Services Administration

Exercise 3: Using Windows PowerShell to Modify User Accounts in Bulk

Scenario

You have received a request to update all user accounts in the new branch office OU with the correct address of the new building. Additionally, you have been asked to ensure that all of the new user accounts in the branch office are configured to force users to change their passwords the next time they sign in. The main tasks for this exercise are as follows:

1. Force all user accounts in LondonBranch to change their passwords at next sign in. 2. Configure the address for user accounts in LondonBranch.

 Task 1: Force all user accounts in LondonBranch to change their passwords at next

sign in

1. On LON-DC1, open a Windows PowerShell Command Prompt window.

2. At the Windows PowerShell prompt, create a query for user accounts in the LondonBranch OU by using the following command:

Get-ADUser -Filter * -SearchBase "ou=LondonBranch,dc=adatum,dc=com" | Format-Wide DistinguishedName

3. At the Windows PowerShell prompt, modify the previous command to force all users to change their password the next time they sign in by using the following command:

Get-ADUser -Filter * -SearchBase "ou=LondonBranch,dc=adatum,dc=com" | Set-ADUser -ChangePasswordAtLogon $true

Task 2: Configure the address for user accounts in LondonBranch

1. On LON-DC1, open the Active Directory Administrative Center.

2. Open the properties for all user accounts in LondonBranch. 3. Set the address for multiple users as follows:

o Street: Branch Office o City: London

o Country/Region: United Kingdom

Results: After completing this exercise, you will have modified user accounts in bulk.

Lab Review Questions

Question: By default, are new user accounts enabled or disabled when you create them by

using the New-ADUser cmdlet?

MCT USE ONL

Y. STUDENT USE PROHIBITED

Installing and Configuring Windows Server® 2012 4-29

Prepare for the next module

When you finish the lab, revert all virtual machines to their initial state by performing the following steps: 1. On the host computer, start Hyper-V Manager.

2. In the Virtual Machines list, right-click 20410D-LON-CL1, and then click Revert. 3. In the Revert Virtual Machine dialog box, click Revert.

MCT USE ONL

Y. STUDENT USE PROHIBITED

4-30 Automating Active Directory Domain Services Administration

Module Review and Takeaways

Review Questions

Question: A colleague is creating a Windows PowerShell script that creates user accounts

from data in a .csv file. However, his script is experiencing errors when attempting to set a default password. Why might this be happening?

Question: You are an administrator for a school district that creates 20,000 new user

accounts for students each year. The administration system for students generates a list of the new students and then exports it as a .csv file. After the data is exported to a .csv file, what information do you need to work with the data in a script?

Question: The Research department in your organization has been renamed “Research and

Development.” You need to update the department property of users in the Research department to reflect this change.

You have created a query for user accounts that have the department property set to

Research, by using the Get-ADUser cmdlet and the -filter parameter. What is the next step

to update the department property to Research and Development?

Tools

Tool Used for Where to find it csvde Csvde is a command-line tool that exports or

imports AD DS objects to or from a comma-separated values (.csv) file.

In Windows Server 2012.

ldifde Ldifde is a command-line tool that you can use

to export, create, modify, or delete AD DS objects. Like csvde, ldifde uses data that is stored in a file.

In Windows Server 2012.

ds* commands You can use ds* commands to create, view, modify, and remove AD DS objects. These tools are suitable for scripts and include: dsadd, dsget,

dsquery, dsmod, dsrm and dsmove.

MCT USE ONL

Y. STUDENT USE PROHIBITED

5-1

Module 5

Implementing IPv4

Contents:

Module Overview 5-1

Lesson 1: Overview of TCP/IP 5-2 Lesson 2: Understanding IPv4 Addressing 5-7 Lesson 3: Subnetting and Supernetting 5-12 Lesson 4: Configuring and Troubleshooting IPv4 5-18 Lab: Implementing IPv4 5-28

Module Review and Takeaways 5-33

Module Overview

IPv4 is the network protocol used on the Internet and local area networks. To ensure that you can you understand and troubleshoot network communication, it is essential that you understand how IPv4 is implemented. In this module, you will see how to implement an IPv4 addressing scheme, and determine and troubleshoot network-related problems.

Objectives

After completing this module, you should be able to: • Describe the TCP/IP protocol suite.

• Describe IPv4 addressing.

• Determine a subnet mask necessary for subnetting or supernetting. • Configure IPv4 and troubleshoot IPv4 communication.

MCT USE ONL

Y. STUDENT USE PROHIBITED

5-2 Implementing IPv4

Lesson 1

In document 20410D-ENU-TrainerHandbook (Page 181-186)

Related documents