>> Hello everyone. I'm instructor Gerri Roberts,
and this is PowerShell scripting.
In this video, we're going to talk about
which PowerShell tools you
can use to work with PowerShell,
PowerShell and the command line,
customizing the interface and
some tools for PowerShell scripting.
First, let's talk about PowerShell tools.
In order to use PowerShell,
you have to use one of the tools.
There are a couple of main tools that are
loaded into Windows instances.
The first one is console.
There's x64 and x86 version,
so there's a 32-bit and 64-bit version.
When opening them,
x64-bit is usually listed as just PowerShell,
and x86 is usually listed as PowerShell x86.
This is good for basic PowerShell usage.
You also have PowerShell ISE.
ISE stands for, Integrated Scripting Environment,
and this is great for writing scripts,
saving scripts, and testing them.
To open the tools,
there are a couple of methods.
Easiest way of locating and opening them,
is to use the Windows Search feature
as you can see picture to the right.
Typically, when you type in PowerShell,
you'll get a list that looks similar to this,
and you'll see that you have
the ISE x86 and you also have the regular one listed.
Best practice is to run in administrative mode.
When you go to open up PowerShell ISE,
you can either right-click or go administrator mode,
and that's the same for the consoles.
Anytime you go and try to open any of
them, right-click administrative mode,
or if you noticed in Windows 10,
you also get this little option here and
the apps pane that says run as an administrator.
For server, there's actually
a special place you can find PowerShell tools.
If you go to Server Manager and you go to the Tools menu,
you can find them in there.
Now you can still search for them just like
you can in the client version of Windows,
it just seems a lot quicker to go tools and PowerShell.
Now, if you're not using
a tool and you want to use the command line instead,
you can actually do that.
It's very simple.
Opening and closing PowerShell in the command line.
For opening, you type
in PowerShell and as you can see here,
you'll get a prompt that says
PowerShell copyright information,
and then you will get
your listing here with PS in the front,
instead of just your regular prompt.
Closing PowerShell, very simple as well,
just type in exit and you will go back
to a normal command line prompt.
The other thing you could do is
you can customize the interface for PowerShell.
Now, when you open up PowerShell,
you'll notice that is very
basic and the command prompt it's still white on black,
in PowerShell, it's white on blue.
You'll want to change that in some cases so
it's easier for you to read or look at.
To change it in the command line prompt is simple,
just right-click the title bar, choose Properties,
you'll see a little menu comes up and then it pops up to
this nice little box where
you can go and change a couple of different things.
If you go to the font section right here,
you'll see that you can change font size,
type, all that good stuff.
If you want to change the colors so
it's a little bit easier to read,
you can go to the colors tab and change those items.
One thing you'll want to notice in
the colors tab is that you have
text for your screen and for pop-ups.
You can change the background and the text on
the normal screen as well as
any pop-ups that might come up as a result of a command.
In console, very similar to
the command line prompt on how you're
going to be able to make those changes,
just right-click at the top,
go to properties,
and you'll see that you get a similar box with fonts,
colors, and all that good stuff that you can do.
Again in here, font changes font size, type,
all that good stuff, and colors
will change the console colors,
you have foreground and background
just as you do in the command line,
as well as pop-up colors like you do in the command line.
Now, big difference
with ISE or Integrated Script Environment,
there are a lot more options for customization.
You can do font, color and size.
If you go to tools and options,
you can change that in there.
You'll see it's under colors and fonts.
There's also some other settings in
general settings where you can change items,
like whether or not IntelliSense is turned on,
whether or not you can view
line numbers when you're typing it out,
and all that good stuff.
Another thing in here that you don't get with others is
a Restore Defaults where you can go
back to PowerShell ISE defaults.
This is something you can't really do in the console.
You can also change
how the window is organized and what you want to show.
On console, on command line,
you pretty much just have a box and that's it.
In ISE, you have a couple of
different boxes with different things
that you can move around.
If you want to add things like say,
the script pane so you can write out your scripts,
you can go to View and
then choose the item you want to view.
Now the script pane can be
viewed on the right or on the top,
so that is something to remember so you
can move that around a little bit
to make it easier to read.
You also have a command
add-on that you can add to the right there.
It's an add-on that allows you to search for
commands which is super
useful if you can't remember a whole command,
but you remember part of it, you could start
typing it and all come up with
a list of similar items to what you're typing.
Some scripting tools that are available.
Scripting you can do with PowerShell ISE.
There are a lot of people that do that,
and it's very useful, very easy.
You even have a little options
for color-coding and stuff like that.
You can even write your scripts in Notepad
and just write them out and save them as a.PS1 file.
You can also use a tool called Notepad++.
Notepad++ allows you to
work like you're in a PowerShell ISE,
your Visual Studio environment where you
can color-code all your commands.
You also have Visual Studio,
you can do PowerShell scripting in Visual Studio and
save it as a.PS1 and run it as a PowerShell script.
Our post-assessment time here.
If you wanted to use
a PowerShell tool that was good for scripting,
which tool would you use?
Would you use the command prompt?
Would you use PowerShell x86?
Would you use PowerShell ISE or PowerShell x64?
Now you can pause, if you'd like.
The answer is C, PowerShell ISE.
PowerShell ISE remember is integrated script environment,
so it's designed for usage with scripts.