Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . a Open a PowerShell command line window and type date in front of the PS C: > sign. 1 . b Type cd

1.a Open a PowerShell command line window and type date in front of the PS C:> sign.
1.b Type cd and change directory to a directory that has some files (not an empty directory)
1.c Type ls
1.d Type Get-Process | Where-Object {$_.ProcessName -Match "^p.*"}
1.e Type Get-Alias [You will get a whole list. Just crop the command and first two lines of the list]
1.f Find the Actual cmdlet name of ls [Show the command you ran in a screen dump]
1.g Do some research on the Get-Date and write a Powershell statement to print the Current Month name.
1.h Type "This is a test" -split ""
1.i Type "Brien","Posey" -join ""
1.j Type these three command pairs one under the other
[Environment]::UserName
[Environment]::UserDomainName
[Environment]::MachineName
2.0 a. On PowerShell command line, Create a sub folder (use New-Item) with the name PowerShell under the cisa3309
folder you created for this course. Then change the directory to that subfolder and then create a subfolder
named testdir under PowerShell.
b. Create 5 text files (Files can be empty), and name them as follows
textfile1.txt, textfile2.txt, textfile3.txt, textfile4.txt, textfile5.txt
c. Type ls [Make sure you see the 5 files]
d. Open the windows file explorer, go to the directory you created in 2.a and then right click on
testfile3.txt, click properties, change the attributes to hidden (Check the hidden checkbox at the
very bottom of the window. Do the same for textfile4.txt .(So you will have 2 hidden files).
* YOU DO NOT NEED TO TAKE A SCREEN DUMP FOR 2.d
e. Now go back to step 2.c (You should not see the two hidden files now)(Get a screen shot)
f. Type Get-ChildItem (What you see should be the same as in 2.e)(Get a screen shot)
g. Hidden files can be seen from PowerShell. Type Get-ChildItem -force (Get a screen shot)
3.0 a. Write a Powershell script (in a .ps1 file) called greeting that prints a greeting to the user -- perhaps "Good
morning" or something similar. Remember to set the file permissions to allow execution [See Class
Note Page 21]. Note : commands in the script file do not need to end with semi-colons. (They are
PowerShell commands, not C statements.)
b. Now modify your script greeting so that it
greets the user by (user) name,
prints the current date, and
prints the user currently logged onto the computer.
For example, your output might look similar to the following:
Good Morning compadmin
Now it is 02/17/20249:05:20
User in machine ADMIN-PC4 is compadmin1.a Open a PowerShell command line window and type date in front of the PS C:> sign.
1.b Type cd and change directory to a directory that has some files (not an empty directory)
1.c Type Is
1.d Type Get-Process | Where-Object {$_.ProcessName -Match "^p.*"}
1.e Type Get-Alias [You will get a whole list. Just crop the command and first two lines of the list]
1.f Find the Actual cmdlet name of Is[Show the command you ran in a screen dump]
1.g Do some research on the Get-Date and write a Powershell statement to print the Current Month name.
1.h Type "This is a test" -split ""
1.i Type "Brien", "Posey" -join ""
1.j Type these three command pairs one under the other
2.0 a. On PowerShell command line, Create a sub folder (use New-Item) with the name PowerShell under the cisa3309
folder you created for this course. Then change the directory to that subfolder and then create a subfolder
named testdir under PowerShell.
b. Create 5 text files (Files can be empty), and name them as follows
textfile1.txt, textfile2.txt, textfile3.txt, textfile4.txt, textfile5.txt
c. Type Is [Make sure you see the 5 files]
d. Open the windows file explorer, go to the directory you created in 2.a and then right click on
testfile3.txt, click properties, change the attributes to hidden (Check the hidden checkbox at the
very bottom of the window. Do the same for textfile4.txt .(So you will have 2 hidden files).
YOU DO NOT NEED TO TAKE A SCREEN DUMP FOR 2.d
e. Now go back to step 2.c (You should not see the two hidden files now)
(Get a screen shot)
f. Type Get-Childltem (What you see should be the same as in 2.e)
(Get a screen shot)
g. Hidden files can be seen from PowerShell. Type Get-Childltem -force
(Get a screen shot)
3.0 a. Write a Powershell script (in a .ps1 file) called greeting that prints a greeting to the user -- perhaps "Good
morning" or something similar. Remember to set the file permissions to allow execution [See Class
Note Page 21]. Note : commands in the script file do not need to end with semi-colons. (They are
PowerShell commands, not C statements.)
b. Now modify your script greeting so that it
ogreets the user by (user) name,
oprints the current date, and
oprints the user currently logged onto the computer.
For example, your output might look similar to the following:
Good Morning compadmin
Now it is 02/17/20249:05:20
User in machine ADMIN-PC4 is compadmin
Be sure to add comments to your
image text in transcribed

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago