You are on page 1of 2

1.

Objective:
o Create a script to import users into Active Directory placing each user in the correct OU and
Security Groups for their department.
o Create the OU and Security Group matching the department name and store the security
groups within the related OU by name.
o Create the OU and Security groups required from the imported data.
o Prompt the user for the path\filename of the file to import.
o Ensure you specify each user to change their password at next login and enable each account
after creation.

Recommendations:
o All work must be performed using PowerShell v7 on your Windows Server virtual machine.
o All screenshots and related files will be submitted via Blackboard and named correctly.
o Incorrectly named files will NOT be graded and will receive a zero.
o Ensure your script is well documented, including the header information.
o Use PascalCode and best practices to ensure you code is readable, understandable, and
organized.
o Marks will be deducted for improper use of Functions, HashTables, aliases and poorly named
variables.
o Ensure transcriptions are being recorded for each PS Session.
o It is recommended to use Visual Studio Code to create your script and save it to the shared
directory with the server. You can use Notepad on the server if you choose.

Note: Practice using sample data prior to running the script on the provided file. The provided
dataset is large and will take time to run. Ensure your script works with your own sample data. Avoid
using the same values for your sample data to prevent any errors and having to remove data.
Listen
Submission Requirements:

o Save a copy of your script (MidTerm-####.ps1) and copy it to your Z drive folder on the host
computer and attach it to your submission in Blackboard.
o Attach a copy of ALL transcript files related to your work on the MidTerm. Do not edit
them. It is ok to have errors in these files.
o Execute the following on your server:
o Get-ADUser -Filter * -Properties * | export-csv c:\bin\MidTermOutput####.csv
o Attach a copy of the Export File to your submission in Blackboard.
Listen
Importing Users to Active Directory PowerShell Script Grading Rubric:

Criteria 1: Functionality (70 points)


o [10 points] CSV Parsing: Properly reads and parses the CSV file.
o [10 points] User Creation: Successfully creates Active Directory OU's based on the CSV data.
o [10 points] User Creation: Successfully creates Active Directory Security Groups based on
the CSV data.
o [10 points] User Creation: Successfully creates Active Directory Users based on the CSV
data.
o [10 points] User Creation: Successfully enables each account and requires password to be
changed.
o [10 points] Error Handling: Includes effective error handling mechanisms to handle potential
issues during CSV parsing or user creation.
o [10 points] Verification: Implements a mechanism to verify the success of user creation and
provides informative output.

Criteria 2: Efficiency (20 points)


o [10 points] Optimization: Demonstrates an efficient and optimized approach in terms of
resource usage and script execution time.
o [10 points] Bulk Operations: Utilizes bulk operations where applicable to minimize the
number of calls to Active Directory.

Criteria 3: Readability and Documentation (20 points)


o [10 points] Comments: Contains meaningful comments explaining key sections of the script,
especially complex logic or error handling.
o [5 points] Variable Naming: Variables have clear, descriptive names following PowerShell
best practices.
o [5 points] Code Structure: Well-organized and follows a logical structure for ease of
understanding.

Criteria 4: Security (15 points)


o [5 points] Credential Handling: Securely handles credentials, avoiding hardcoding and
implementing appropriate methods (e.g., prompting for credentials).
o [5 points] Permission Checks: Ensures that the script runs with the necessary permissions to
interact with Active Directory.
o [5 points] Logging: Implements logging mechanisms to track script activities, especially
errors and user creation success.

Criteria 5: User Input and Flexibility (5 points)


o [5 points] User Input: Prompts the user for necessary input (e.g., CSV file path) in a user-
friendly manner.

Criteria 6: Bonus (up to 5 points)


o [5 points] Advanced Features: Includes additional advanced features like parameter
validation, progress indicators, or support for different user attributes.

You might also like