This video we'll take a look at the answers for lap on format and command output.
Let me remind you of the scenario for that lab.
Your own realisation has specific criteria for the content and appearance of management reports.
You get to write several commands that were used formatted output so that the output could be used in
management reports.
Let's go to exercise one in which you had to create a formatted display of computers system information
as a task one so you had to pipe the output of a command to get member to see a list of properties or
two from at least asterisk to say a list of properties and then well years by using the command get
the same instance there's class re-inserted to underscore computer system and you get to create at least
display that included the following computer's name description domain manufacturer modal number of
processors install physical memory in gigabytes and step 3 was to create the specified list.
So to do that task you could run the following command.
Get to the same instance Desch class re-inserted to underscore computer system Pypard to formant least
the property and formatted by the computer's name Komer description comma Dumaine comma manufacturer
comma modal comma number of processors and a calculated property where an OR name equals total physical
memory in quotes and expression equals biocide and total physical memory divided by 1 gigabyte task
was to create a formatted table of process information you had to display a table of running processes
and the table had to encode the forwarding process name ID virtual memory in megabytes to two decimal
places.
Physical memory and megabytes to two decimal places.
Step two was that the table had to have additional space between didn't have to have additional space
between the columns and had to be redirected to a text file that was named.
That takes two and step three was to create the specifier at least by running the power shell command.
So you could use the following command to get process by form formal table by property name ID and calculated
property with name the name and expression beside him that we have divided by 1 megabyte for months
3 in equals and 2 and another custom property with PM for name and expression beside him that PM divided
by 1 megabyte for months three in equals and 2.
And it should should be auto sayst and pipe 2 out file approx.
That takes the tasks three ways to display a table of processes organized by base priority level.
You get to display tables of random processes.
The tables had to be are identical to the output normally produced by gate process using a single command.
You had to create one table for each of the processes base priority property.
So to display the specified list you could run get proses pipes sort base priority and pipe it to form
a table.
There's group by base priority task for wants to display a list of local to supply roads you had to
run it to use all the command get net rolled display in a table of two separate bureaus.
The table had to enclose the Fulham Road address Family road metric type of road destination graphics
and the destination graphics had to be right aligned the table had had not to include additional space
between Cowens to create the specified table.
You could run Nat get get There's no road pipe it to for my table there's property address Family road
or Mattrick type of road.
And Atika co-curated property is name equal and destination Grafix and expression equal and be outside
that destination graphics a line equals right and auto size.
Now let's move on to the exercise too in which you had to reproduce specified output in test Kwami you
had to write a command that displays file names and sizes as specified.
Step one was to write a command that will display a list of all files haven't and that is the filename
extension and the C-Drive Windows directory you're out good must Bluecoat exactly as follows to produce
a specified output run the following command.
Get child item that spells Seacole on backslash windows backslash stories that you see by sort object.
There's property lands there's descendant and pipe it to form a table desk property name karma.
And the following custom property name Mikel's Sarrazin kilobyte an expression equals beside that lands
divided by one kilobyte format Martinek unequals and 2 and altar that task to you had to write to a
command that displayed Ihram block entries specified.
Step one was it want lock controls had to to have a time generated and time written.
The difference between those two times is typical is zero.
However it is possible for there to be a delay between the time that the event is generated and the
time that it was written into the lock you had to display the most recent 20 entries from the security
went look calculate the difference between the time each event was generated and the time that it was
written to display the list exactly as shown on the image.
So to do that you have to run the following command.
To run clock does log name security.
Newest round to pipe it to select object.
Property with calculated property and pipe it to sort of object Desch property.
Time difference there is just sound and the last five to format table this property anti-ID time difference.
There are two sides.