Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need a script that meets all of these requirements: Manage Users Script Overview Since user and group management is such a large task it is

Need a script that meets all of these requirements:

Manage Users Script

Overview

Since user and group management is such a large task it is useful to create scripts to help automate the work. In this exercise you will create an OU, group and a series of users on your domain. Then you will find each non Domain Controller computer in the organization and add the domain group to a local group. You will need to use both the Active Directory cmdlets and the WinNT provider to complete the script. Details follow.

Use the sample XML data accounts.xml, a portion of the file follows (you can download the full file from http://classfiles.esage.com/labs/aws/accounts.xml )

Chico

Leonard

Marx

Pianist

Password1

comedians

Marx Brothers

GGMusicians

Harpo

Arthur

Marx

Original first name was Adolph

Password2

Chico

comedians

Marx Brothers

Domain Admins

Power Users

Marx Brothers

Requirements

Create a Script named Manage-Users.ps1 that performs the following functions

Allow user to input a filename to process.

Create a required string parameter named filepath that accepts the name of the xml file to process. Provide an appropriate help message when parameter is not submitted.

Read the xml file and perform the following tasks.

Create the users. The users are listed in the node of the xml file. The node will have an arbitrary number of nodes that contain user information.

Create the user account in the organizational unit defined by the data. Create the OU (off the domain root) if it does not exist.

Set the users name to the value in

Set the other information as listed

Make sure each account is not disabled

Require the user to change their password next time they log in

Add the user to the domain security groups listed in the node. If the group does not exists create it.

Process the items in the node.

Find all non-domain controller computers in the domain

Add the domain global group specified in the node(s) to each discovered computers local group specified by the node. If the local group does not exist create it.

Provide output as appropriate as the script executes.

Assumptions

The computer the script is running on will be in the domain that you wish to manage.

The computer running the script will have the Active Directory PowerShell module installed.

The user running the script will have rights to do all required tasks

Helps

You can use the Create-ManageUsersTestfile.ps1script to create test files. You can download the script from canvas or from here http://classfiles.esage.com/labs/aws/Create-ManageUsersTestfile.ps1 Usage Create-ManageUsersTestfile.ps1 testfilename.xml

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

5. Benchmark current training practices.

Answered: 1 week ago