Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

POWERSHELL SCRIPTING You are an analyst at a small firm and your manager has tasked you with writing a script to automate tasks. To test

POWERSHELL SCRIPTING You are an analyst at a small firm and your manager has tasked you with writing a script to automate tasks. To test your script, you have been given a sandbox environment that mimics your live system. The domain contains 12 user accounts within three organizational units: Human Resources (HR), Finance, and Sales. Your manager has identified the need for scripts to automate the following tasks, to be divided up by you and your coworkers: Reset all the passwords of the employees of an organizational unit of your choice. Set the passwords to NewP@$$w0rd. Separate all the files in c:\officefiles into two folders: c:\HR_Backup and c:\Sales_Backup. If the file name contains HR, move this file to the HR_backup folder; file names that contain Sales should be moved to Sales_backup. For all files that are moved, you should append _backup to each of the file names. For example, HR_File1.txt would be HR_File1_backup.txt Add four new user accounts to a particular organizational unit of your choice: Username: User_1 Password: P@ssW0rd Username: User_2 Password: P@ssW0rd Username: User_3 Password: P@ssW0rd Username: User_4 Password: P@ssW0rd Use the Ping utility to report connections of all IP addresses that end in an odd number in the network, and output them to a text file called ping.txt Check all employees for automatic password renewal, and output a list of users with Password Never Expires flag set in their profiles Create a user group named Audit and include all the employees of the HR and Finance organizational units Find all users with inactive and disabled accounts across all organizational units. Output the list to a text file named inactive_users.txt Get a list of last logon times for all users in a specific organizational unit. Output the list to a text file named user_last_logon.txt Your work assignment is to select two of the above tasks and create a script to automate each one that you have chosen. Prompt In this assignment, we are challenging you to incorporate the following elements in each script: Repetition structure Compound conditional statement Variable declaration and usage For each element, add a comment describing the element for each of the three requirements above. You must also add your name, date, and course title as a comment at the beginning of your script. Each script must contain at least four comments

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions