>> Hello everyone. I'm instructor Gerri Roberts,
and this is PowerShell scripting.
In this video, we're going to
talk about what PowerShell is,
a brief history of PowerShell
and how PowerShell is actually used.
What exactly is PowerShell?
PowerShell is a command line shell and scripting tool.
More specifically, it shows a user interface for
an operating system that could be
a command line or what most people are used to,
a GUI based Shell where you can click around it,
and interact with the interface.
Now, PowerShell is Command Line-based.
You'll be doing a lot of typing.
PowerShell allows you to perform
tasks by using commands,
for example, adding a user to
Active Directory using the New-ADUser command.
It also allows you to create scripts to automate tasks,
such as deploying configuration,
some multiple machines or Virtual Machines.
Here you can see what PowerShell looks like.
Now, in this picture,
I have modified the text color.
But for the most part,
PowerShell is going to look like this,
where you just have a bunch of lines of text.
Brief history of PowerShell.
Now, originally, Microsoft used either
Command.exe or CMD.exe first command line interface.
Some of you may remember
older interfaces that had
to do with DAS and things like that.
That's what the Command.exe and CMD.exe did.
Unfortunately,
these are very limited in what they can do.
Microsoft try their hand at fixing this by using VB or
Visual Basic Script to complete
tasks that CMD command line just could not do.
This took a lot of code.
I mean, a lot, very many lines.
They worked on making something
more efficient and started
Project Monad back in about 2002.
But it wasn't until 2006 when PowerShell 1.0
>> was released that the world got to
>> actually see PowerShell.
>> When PowerShell was released it
was released for Server 2003,
Server 2008, XP Service Pack 2, and Vista.
We are now on PowerShell 5.1 and
PowerShell Core 6.0 and 6.1.
Brief history of versioning.
PowerShell 1 came out in 2006
and again with Server 2003 and 2008,
as well as Windows Versions for XP and Vista.
In 2009, 2.0 came out
>> and we were able to use that
>> on 2008 R2 and Windows 7.
About three years later we had 3.0,
which gave us Server 2012, and Windows 8.
Another year later in 2013,
we had 4.0,
which gave us Server 2012 R2, and Windows 8.1.
2014, 5.0 came out
>> and allowed us to work with Windows 10.
>> Now, more recently,
2017 5.1 came out
and this allowed us to work with
Windows 10 Anniversary Update,
our Server 2016, and
other new iterations of Microsoft products.
Now, you might have heard me earlier talk about
PowerShell and PowerShell Core Versions.
PowerShell Core is actually
the newer iteration of PowerShell,
is supposed to work on more systems and
just Microsoft based systems.
You can run it on Windows,
Linux, and Mac systems.
Future development is focusing on
more Linux distributions such as
IoT operating systems like Raspberry Pi.
Currently, PowerShell Core 6.1
supports ARM32 devices with
support for more in the future.
Going forward, Microsoft plans on eventually
replacing all instances of
PowerShell with PowerShell Core.
However, that isn't something that is 100 percent,
so there is something you will need to
pay attention to to see if they do.
Now, why does versioning matter?
Well, there's an issue of versioning.
Each version of PowerShell supports
different commands and different groups of features.
You might need to choose
something different for what you need to
accomplish than what is
currently with your operating system.
To do that, you can get other versions of
PowerShell at Microsoft on their PowerShell site at
>> https://docs.microsoft.com/en-us/powershell.
>> Now if you're not in United States,
you can go to your Microsoft site for your country,
lookup PowerShell, and it
should be one of the first results.
PowerShell Core is actually available on GitHub.
So if you need core,
instead of going to the Microsoft site,
you can get it on GitHub.
On GitHub you can search for PowerShell or you can make
your way to github.com/powershell/powershell.
Over here you can see what that repository looks like.
There are actually quite a few files
in here, including documentation.
It's not just the binaries and
the things that you need to get PowerShell working.
So what is PowerShell use for?
Earlier, we talked a little bit about that,
but let's delve a little bit further.
One of the biggest uses of PowerShell is automation.
When we're working on our servers,
there are a lot of tasks that we need
to do on a regular basis.
Now doing those tasks
manually takes up a lot of time and that could
be things like pushing configuration changes to
multiple computers or updating accounts.
Those kind of things,
if we do them individually, just would take forever.
We can use PowerShell to create a script
>> that will run on a regular basis
>> to automate what we're trying to do.
PowerShell is also used for
creating other types of scripts such as log on scripts.
Log on scripts can do things for us,
like set the desktop on a computer,
set permissions on the computer and other things.
Client and server management,
remote management tasks are
one of the biggest things here.
We can remotely manage client and
server machines using PowerShell,
using whim or CMI.
We can also use PowerShell for information gathering
>> such as CPU and system information.
>> So if we need to go and find a bunch of
information about particular systems in our network,
we can use PowerShell to
deploy something to grab that information for us.
PowerShell can also be used for
computer documentation such as logs,
more specifically, like event logs,
security logs, and other Windows logs.
Time for a test.
If you wanted to use PowerShell
on a non-Windows operating system,
which version would you use?
Would you use PowerShell 3.0,
would you use PowerShell Core 6.0,
would you use PowerShell 5.1 or
>> would you use PowerShell 4.0?
>> Now you can pause this video,
but I'll give you a second to figure
out the answer and then I'll give you the answer.
The answer, PowerShell Core 6.0.
Now guys, remember, PowerShell Core is
the version that is used for Windows
and non- Windows systems.