Question: . Use the following snapshot for the lab assignment: Non-AD PowerShell (Week 8). Enter in a Word document the following; enter a command to complete
. Use the following snapshot for the lab assignment: Non-AD PowerShell (Week 8). Enter in a Word document the following; enter a command to complete the following tasks:
i. All files with the dll extension in the c:\windows\system32 directory only in that directory and not recursively use full syntax, do not use aliases or shortcuts.
ii. All files with the dll extension in the c:\windows\system32 directory same as above but use aliases, shortcuts, system environment variables, etc. (Hint: an example of a system environment variable is %username% that holds the value of the current logged on user name. Important: From now on, use aliases as you wish (not critical). But use system environment variables as much as possible. The reason for this is because system environment variables allow for greater flexibility and dynamic code interactivity.
iii. Count how many files with the dll extension are in c:\Program Files\Common Files and all its subdirectories. Calculate the total space (sum) of all those files.
iv. Output the above into a text file named c:\itec350scripts\dll in Common Files folder.txt (Note: the name of the output file should be as given, make sure there are spaces within the file name.)
v. Display a list of stopped services sorted alphabetically.
vi. Display a list of objects in the c:\ITEC350Scripts folder (displays only the default properties).
vii. Display a list of objects in the c:\ITEC350Scripts folder (displays all properties).
viii. Display a list of objects in the c:\windows folder but only display objects that have been modified in the year 2009 (Hint: which property is to be filtered?).
ix. Display a list of processes that are using more than 10% of the CPU resources.
x. Display a list of processes that are using more than 10% of the CPU resources, sorted in descending order of CPU use.
xi. Create a script file that accomplishes the following:
1. The script file is to prompt the user to enter a file extension.
2. The script file is to prompt the user to enter a directory on the hard drive.
3. The file extension and directory that the user responds with will be saved into variables.
4. The script file then displays all files with the user-entered file extension in the user-entered directory recursively.
5. The display output above is to be saved into a file named c:\ITEC350Scripts\user-requested-files.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
