Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PowerShell Script [Windows] Goals/Objectives: Write a simple PowerShell script Specific Directions with Specific Grading Criteria: Write a PowerShell script that: (20%) Takes one command line

PowerShell Script [Windows]

Goals/Objectives:

Write a simple PowerShell script Specific Directions with Specific Grading Criteria:

Write a PowerShell script that:

(20%) Takes one command line argument in the form of a path to a directory.

o (10%)If the directory does not exist, tell the user and exit quietly.

Using the files in the directory do the following:

o (10%) For any files that happen to be directories, show the text [Directory] and then the full pathname.

o If it is a regular file, show: (10%) The text [File] (20%) The size of the file in Bytes.

(10%) The name of the file.

o (20%) Neat formatting, output should beconsistent with the sample below.

Submit your .ps1 file via Moodle.

image text in transcribed

Example output: Type Path/Size Name [Directory] c:\Oracle Directory] c:\PerfLogs Directory] c:\Program Files [Directory] C:\Program Files (x86) Directory] c:\Python34 Directory] c:\TeamVi ewer Directory] c:\Users Directory] c:\windows Directory] c: \Windows.old File File File File File File File File File File File File File File File File File 17 KB 17 10 KB 17 KB 17 KB 0 KB 17 KB 17 KB 17 KB 1 KB 550 KB 1 KB 75 KB 94 KB 89 KB 95 KB 93 eula.1028.txt eula.1031.txt eula.1033.txt eula.1036.txt eula.1040.txt eula.1041.txt eula.1042.txt eula.2052.txt eula. 3082.txt lobdata.ini nstall.exe install.ini nstall.res. 1028.d11 install.res.1031.d11 install.res.1033.d11 instal1.res.1036.d11 instal1.res.1040.d11 instal1.res.1041.d11 Example output: Type Path/Size Name [Directory] c:\Oracle Directory] c:\PerfLogs Directory] c:\Program Files [Directory] C:\Program Files (x86) Directory] c:\Python34 Directory] c:\TeamVi ewer Directory] c:\Users Directory] c:\windows Directory] c: \Windows.old File File File File File File File File File File File File File File File File File 17 KB 17 10 KB 17 KB 17 KB 0 KB 17 KB 17 KB 17 KB 1 KB 550 KB 1 KB 75 KB 94 KB 89 KB 95 KB 93 eula.1028.txt eula.1031.txt eula.1033.txt eula.1036.txt eula.1040.txt eula.1041.txt eula.1042.txt eula.2052.txt eula. 3082.txt lobdata.ini nstall.exe install.ini nstall.res. 1028.d11 install.res.1031.d11 install.res.1033.d11 instal1.res.1036.d11 instal1.res.1040.d11 instal1.res.1041.d11

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Solve v3x + 4 + v5 - x = 5

Answered: 1 week ago

Question

=+2 Why are so many countries bothered by their brain drains?

Answered: 1 week ago