Question: 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
 1.a Open a PowerShell command line window and type date in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!