WEBVTT

00:00.000 --> 00:03.300
>> Hello, everyone. I'm
instructor Gerri Roberts

00:03.300 --> 00:05.325
and this is
PowerShell Scripting.

00:05.325 --> 00:07.170
In this video, we're
going to learn

00:07.170 --> 00:09.015
about some additional
help items.

00:09.015 --> 00:11.265
We're going to learn
about the About Library,

00:11.265 --> 00:12.915
the ShowWindow command,

00:12.915 --> 00:15.255
and the Show-Command command.

00:15.255 --> 00:18.045
First of all, the About library.

00:18.045 --> 00:22.670
PowerShell actually has a
very robust About Library,

00:22.670 --> 00:24.680
and according to Microsoft,

00:24.680 --> 00:26.720
these are topics
that cover a ranges

00:26.720 --> 00:29.105
of concepts about PowerShell.

00:29.105 --> 00:31.820
Basically, these are
help files that help

00:31.820 --> 00:35.434
the user understand some
concepts within PowerShell.

00:35.434 --> 00:39.830
The output you get from the
about files is pretty similar

00:39.830 --> 00:41.690
to the -full switch that we did

00:41.690 --> 00:44.075
with the help commands
a couple of videos ago.

00:44.075 --> 00:47.105
It's more robust than
normal help files.

00:47.105 --> 00:49.880
For example, if we wanted to

00:49.880 --> 00:52.940
get information about
environment variables,

00:52.940 --> 00:56.720
we would use the Get-Help
space and then list

00:56.720 --> 01:01.705
the about file which is
about_Environment_Variables.

01:01.705 --> 01:03.750
Now, something to notice.

01:03.750 --> 01:07.460
The about files will
always start with about _,

01:07.460 --> 01:11.325
so whatever you're looking
up will start with about_.

01:11.325 --> 01:13.460
Now, the command
here will bring up

01:13.460 --> 01:15.905
the about file for our
environment variables,

01:15.905 --> 01:18.660
which you can see in
the picture over here,

01:18.660 --> 01:19.820
we piped it to

01:19.820 --> 01:23.435
a text file so you can
look at the information.

01:23.435 --> 01:24.915
Now, in some cases,

01:24.915 --> 01:27.200
it might be easier to
pipe to a text file so

01:27.200 --> 01:29.825
you could sit there and read
it or have it for later.

01:29.825 --> 01:31.910
In other cases, you
can go ahead and just

01:31.910 --> 01:35.100
put it on your PowerShell
window and read through it.

01:36.110 --> 01:38.430
Now, if you want to see all of

01:38.430 --> 01:40.400
the about files
that are available,

01:40.400 --> 01:46.355
you can type Get-Help
space about_ and wildcard.

01:46.355 --> 01:50.800
This will find all of
the about files by using

01:50.800 --> 01:53.090
about_ and a wildcard to

01:53.090 --> 01:56.240
find any files that
start with about_.

01:56.240 --> 01:59.449
Now, remember, all those files

01:59.449 --> 02:02.850
for the about files are about_.

02:03.890 --> 02:08.285
Or if you don't want
to look in PowerShell,

02:08.285 --> 02:11.825
you can find them on the
Microsoft Docs website.

02:11.825 --> 02:16.325
If you go to the Microsoft
Docs PowerShell website

02:16.325 --> 02:19.655
and look up about files,

02:19.655 --> 02:22.700
you'll be able to find
the article that lists

02:22.700 --> 02:26.300
all those files or
you can try typing

02:26.300 --> 02:28.640
this entire URL into

02:28.640 --> 02:32.905
your browser and you'll be
able to find it that way.

02:32.905 --> 02:34.740
Now, notice this is another

02:34.740 --> 02:37.560
en-us if you are in
a different country.

02:37.560 --> 02:39.560
Easiest way to find it is to go

02:39.560 --> 02:41.585
to the Microsoft Docs website,

02:41.585 --> 02:43.020
type in PowerShell,

02:43.020 --> 02:45.110
and then when you find
the PowerShell page,

02:45.110 --> 02:48.810
search for about file
on the PowerShell page.

02:49.490 --> 02:53.655
Another useful item is
the ShowWindow Command.

02:53.655 --> 02:56.840
-ShowWindow is actually a
switch parameter and it moves

02:56.840 --> 02:58.400
the output from the current to

02:58.400 --> 03:01.100
another one windows to
make it easier to read.

03:01.100 --> 03:03.840
For example here, we did

03:03.840 --> 03:07.570
get-help about_aliases and then

03:07.570 --> 03:10.165
we did the perimeter
for ShowWindow,

03:10.165 --> 03:11.665
and instead of showing

03:11.665 --> 03:13.820
all that information
in the current window,

03:13.820 --> 03:17.365
it pops up another window
to make it easier to read.

03:17.365 --> 03:21.145
It also gives you the bonus
of having a search feature,

03:21.145 --> 03:22.915
which if you look at the top

03:22.915 --> 03:26.065
of the ShowWindow window
you can see find.

03:26.065 --> 03:28.120
If you start typing
in something,

03:28.120 --> 03:30.490
it will look for it
just like you could

03:30.490 --> 03:33.665
find it in a Word
document or another item

03:33.665 --> 03:35.470
and you'll also be able to

03:35.470 --> 03:37.510
scroll through using
previous and next if

03:37.510 --> 03:42.050
it finds more than one
result for your search.

03:43.200 --> 03:48.090
Another useful command,
the -Show-Command.

03:48.090 --> 03:50.930
This is very useful because it

03:50.930 --> 03:54.214
allows you to pop
up a command into

03:54.214 --> 03:56.540
a graphical window so you

03:56.540 --> 03:58.730
can work with it a little

03:58.730 --> 04:01.265
bit easier than
just typing it out.

04:01.265 --> 04:03.590
When that pops up instead

04:03.590 --> 04:06.365
of having it look
like the ShowWindow,

04:06.365 --> 04:09.490
it's actually information
about the command.

04:09.490 --> 04:11.490
So you have a bunch of tabs,

04:11.490 --> 04:14.340
each tab is a perimeter
for that command.

04:14.340 --> 04:18.885
Any command parameter
that is required,

04:18.885 --> 04:20.780
so any of those that have to be

04:20.780 --> 04:24.215
done are marked
with an asterisk.

04:24.215 --> 04:26.750
Any changes that you
make in this window,

04:26.750 --> 04:28.280
you can run into

04:28.280 --> 04:30.125
your regular PowerShell window

04:30.125 --> 04:32.490
by clicking Run at the bottom.

04:32.490 --> 04:37.850
You can also copy any of these
changes by using copy at

04:37.850 --> 04:39.200
the bottom and that will copy

04:39.200 --> 04:41.810
your information
into the clipboard

04:41.810 --> 04:44.130
so you can look at it later.

04:45.070 --> 04:49.250
Updating help. Things do

04:49.250 --> 04:51.050
change from time to time so you

04:51.050 --> 04:53.210
may have to update
your help files.

04:53.210 --> 04:55.495
In order to do this,

04:55.495 --> 04:56.955
there's a couple of things.

04:56.955 --> 04:58.980
If you're online,
it's very simple,

04:58.980 --> 05:00.675
you just type update help,

05:00.675 --> 05:03.890
it'll run for a few
minutes and it'll pull

05:03.890 --> 05:05.690
all the different
changes from online

05:05.690 --> 05:08.465
for the Microsoft server
and update for you.

05:08.465 --> 05:10.680
If you are offline,

05:10.680 --> 05:13.440
unfortunately it's a
little more complicated.

05:13.440 --> 05:15.520
What you have to do
is you have to go to

05:15.520 --> 05:18.725
another computer
that is updated,

05:18.725 --> 05:22.810
use the save-help command
to save them to a drive or

05:22.810 --> 05:25.120
removable media so that saves

05:25.120 --> 05:26.785
all the updates to

05:26.785 --> 05:29.495
something you could bring
to the other computer.

05:29.495 --> 05:31.360
Then when you get to
the other computer

05:31.360 --> 05:32.425
and you put it in the media,

05:32.425 --> 05:35.140
you have to run update
help with a source

05:35.140 --> 05:38.710
path parameter pointing to
that media that you have,

05:38.710 --> 05:41.410
and what it'll do is
it'll sink the files from

05:41.410 --> 05:45.560
that media to your computer
to update your help.

05:47.180 --> 05:50.250
Post-assessment time.

05:50.250 --> 05:52.780
If you wanted to move the
output of a command to

05:52.780 --> 05:55.120
another window to make
it easier to read,

05:55.120 --> 05:58.145
which switch parameter
would you use?

05:58.145 --> 05:59.885
Would you togglewindow,

05:59.885 --> 06:04.270
ShowWindow,
Show-Command or Show?

06:04.390 --> 06:08.490
I'll give you a minute to go
ahead and think about it.

06:11.330 --> 06:13.770
It would actually be ShowWindow.

06:13.770 --> 06:15.830
Now, ShowWindow
moves the output of

06:15.830 --> 06:18.980
a command to another windows
and make it easier to read.

06:18.980 --> 06:23.270
Now, remember, Show-Command
moves the command

06:23.270 --> 06:25.595
itself to another window

06:25.595 --> 06:28.780
and shows you the parameters
for that command.

06:28.780 --> 06:32.740
That's why you would
choose ShowWindow.

