Welcome to this slap here is lab Sonera you have written a vendor's power shell command and have to
share it with several coworkers before sharing the command tell them you have to package it in a script.
Your coworkers must be able to use this script to run the command by providing only minimal input to
this group.
You have four exercises in this lab.
In exercise one you'll have to test the command exercise too.
You'll have to it to rise change in 12 years exercise three.
You'll have to wait for both out and in exercise for You'll have to add command based help.
So let's go to exercise.
One of the main tasks for this exercise are as follows.
Task 1.
Test their command.
Here you can see their command.
It's pretty long and you have to test it to say for sure that it works.
Step one for this task is to open windows power Sheliah see as administrator.
And step two is to test the command and make sure that it runs without error.
Let's move on to exercise to get a motorized change and well use task one for this exercise is to identify
change and wellness in a command.
So in the windows power shell I'll see you have to type like command which was mentioned in the exercise
one and step two for this task.
You'll have to identify too well.
And this command that might have to change every time someone runs the command task to for this exercise
is to create in your script file to work in.
So in step one in the windows power shall I see you have to create a new script file and save this empty
script file as get the disk in for that is one file on disk C. or or in the scripts directory.
In other words the location you want to save it two tasks three for this exercise is to add to perimeter
block in the script.
So in your blank get desk deals don't play as one script.
Create a new perimeter block.
Make sure that you include the command let bind an attribute before the parameter block.
Step two for the task three is to add a mandatory restraint parameter named computer name.
Step three is to add an integer parameter named drive type.
Step 4 give the drive type parameter a default value of three.
And the final step safe and close the script task five for this second Texas size available to test
the script step 1 for task 5 is to run the script to do so in the IAC either breath press 5 or click
the transcript button in the toolbar for the computer name prompt type local host or the name of your
computer and then press enter.
And step three is to verify that the script finishes without error.
So after completing this exercise you'll have identified it and parameterised change in 12 years and
the amount.
Let's move on to exercise 3 where you'll have to add to verbose output.
Task 1 for this exercise is to add verbose output.
So continuing on from the previous exercise is modify your girl to drive in for that as one script to
produce verbose output when the script runs the verbose output should include the computer name and
the drive type information.
The descriptors use in Task 2 for this exercise is to test the script.
So in the windows powers shall I say switch to the console pane change to the C drive or the folder
the script Ilian and run the script so that verbose output does not display.
Step four is to run the script so that verbose output is displayed.
So after completing this exercise you'll have changed your script so that it produces verbose old code
and the final exercise for this slap is to add command based help task one for this exercise to at best
help command based help.
So you have to continue on from the previous exercises in your get de-risk script and add command based
help include at least the Folarin items.
Cynapsus description computer name perimeter drive type parameter and example and save this group task
to for this exercise will be to test the script.
So in the event those power supplies to switch to the console pain then change to the folder in which
you have this script.
For example C-Drive scripts folder and display the help for the gelt disk unifor in a floating window.
So after completing this exercise you have added documentation to your script by using command based
help.
And again if you have some answers or you cannot complete some of the exercises or tasks I'll provide
onse or video or after this one you can refer to it review it and get back to the questions you have
in this lab.