Additional Help

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
1 hour 43 minutes
Difficulty
Intermediate
CEU/CPE
2
Video Transcription
00:00
>> Hello, everyone. I'm instructor Gerri Roberts
00:00
and this is PowerShell Scripting.
00:00
In this video, we're going to learn
00:00
about some additional help items.
00:00
We're going to learn about the About Library,
00:00
the ShowWindow command,
00:00
and the Show-Command command.
00:00
First of all, the About library.
00:00
PowerShell actually has a very robust About Library,
00:00
and according to Microsoft,
00:00
these are topics that cover a ranges
00:00
of concepts about PowerShell.
00:00
Basically, these are help files that help
00:00
the user understand some concepts within PowerShell.
00:00
The output you get from the about files is pretty similar
00:00
to the -full switch that we did
00:00
with the help commands a couple of videos ago.
00:00
It's more robust than normal help files.
00:00
For example, if we wanted to
00:00
get information about environment variables,
00:00
we would use the Get-Help space and then list
00:00
the about file which is about_Environment_Variables.
00:00
Now, something to notice.
00:00
The about files will always start with about _,
00:00
so whatever you're looking up will start with about_.
00:00
Now, the command here will bring up
00:00
the about file for our environment variables,
00:00
which you can see in the picture over here,
00:00
we piped it to
00:00
a text file so you can look at the information.
00:00
Now, in some cases,
00:00
it might be easier to pipe to a text file so
00:00
you could sit there and read it or have it for later.
00:00
In other cases, you can go ahead and just
00:00
put it on your PowerShell window and read through it.
00:00
Now, if you want to see all of
00:00
the about files that are available,
00:00
you can type Get-Help space about_ and wildcard.
00:00
This will find all of the about files by using
00:00
about_ and a wildcard to
00:00
find any files that start with about_.
00:00
Now, remember, all those files
00:00
for the about files are about_.
00:00
Or if you don't want to look in PowerShell,
00:00
you can find them on the Microsoft Docs website.
00:00
If you go to the Microsoft Docs PowerShell website
00:00
and look up about files,
00:00
you'll be able to find the article that lists
00:00
all those files or you can try typing
00:00
this entire URL into
00:00
your browser and you'll be able to find it that way.
00:00
Now, notice this is another
00:00
en-us if you are in a different country.
00:00
Easiest way to find it is to go
00:00
to the Microsoft Docs website,
00:00
type in PowerShell,
00:00
and then when you find the PowerShell page,
00:00
search for about file on the PowerShell page.
00:00
Another useful item is the ShowWindow Command.
00:00
-ShowWindow is actually a switch parameter and it moves
00:00
the output from the current to
00:00
another one windows to make it easier to read.
00:00
For example here, we did
00:00
get-help about_aliases and then
00:00
we did the perimeter for ShowWindow,
00:00
and instead of showing
00:00
all that information in the current window,
00:00
it pops up another window to make it easier to read.
00:00
It also gives you the bonus of having a search feature,
00:00
which if you look at the top
00:00
of the ShowWindow window you can see find.
00:00
If you start typing in something,
00:00
it will look for it just like you could
00:00
find it in a Word document or another item
00:00
and you'll also be able to
00:00
scroll through using previous and next if
00:00
it finds more than one result for your search.
00:00
Another useful command, the -Show-Command.
00:00
This is very useful because it
00:00
allows you to pop up a command into
00:00
a graphical window so you
00:00
can work with it a little
00:00
bit easier than just typing it out.
00:00
When that pops up instead
00:00
of having it look like the ShowWindow,
00:00
it's actually information about the command.
00:00
So you have a bunch of tabs,
00:00
each tab is a perimeter for that command.
00:00
Any command parameter that is required,
00:00
so any of those that have to be
00:00
done are marked with an asterisk.
00:00
Any changes that you make in this window,
00:00
you can run into
00:00
your regular PowerShell window
00:00
by clicking Run at the bottom.
00:00
You can also copy any of these changes by using copy at
00:00
the bottom and that will copy
00:00
your information into the clipboard
00:00
so you can look at it later.
00:00
Updating help. Things do
00:00
change from time to time so you
00:00
may have to update your help files.
00:00
In order to do this,
00:00
there's a couple of things.
00:00
If you're online, it's very simple,
00:00
you just type update help,
00:00
it'll run for a few minutes and it'll pull
00:00
all the different changes from online
00:00
for the Microsoft server and update for you.
00:00
If you are offline,
00:00
unfortunately it's a little more complicated.
00:00
What you have to do is you have to go to
00:00
another computer that is updated,
00:00
use the save-help command to save them to a drive or
00:00
removable media so that saves
00:00
all the updates to
00:00
something you could bring to the other computer.
00:00
Then when you get to the other computer
00:00
and you put it in the media,
00:00
you have to run update help with a source
00:00
path parameter pointing to that media that you have,
00:00
and what it'll do is it'll sink the files from
00:00
that media to your computer to update your help.
00:00
Post-assessment time.
00:00
If you wanted to move the output of a command to
00:00
another window to make it easier to read,
00:00
which switch parameter would you use?
00:00
Would you togglewindow,
00:00
ShowWindow, Show-Command or Show?
00:00
I'll give you a minute to go ahead and think about it.
00:00
It would actually be ShowWindow.
00:00
Now, ShowWindow moves the output of
00:00
a command to another windows and make it easier to read.
00:00
Now, remember, Show-Command moves the command
00:00
itself to another window
00:00
and shows you the parameters for that command.
00:00
That's why you would choose ShowWindow.
Up Next