Why PowerShell?

Keyboard Shortcuts

Understanding what PowerShell can do is vital to levaging it for your organizations. In this video we will take a look at the basic tenants behind PowerShell and what you will need to know on working with PowerShell

- Let's talk about why you need PowerShelland why you need to learning this wonderfullanguage that you have available to you.Especially if you're an IT pro or even a developer,you're going to want to learn this language.PowerShell provides just a wealth of ability insideof your entire IT infrastructure environment.First off, why?It's a rich scripting environment,but I don't want you to limit your thinkingthat PowerShell is just a scripting language.It's actually a powerful shell an environmentthat we can do interactive commands,and all kinds of other great things inside of it.

PowerShell is a language not necessarily justa scripting environment but it's oneof the abilities that it offers.It does Bulk Operations so much like we do with scripting.With PowerShell we can perform the perform the same tasksover multiple servers, thousands of servers even, if need beto really perform a lot of great workand keep our work consistent across all those servers.Do a lot of the heavy lifting insteadof having to go do all the manual steps through GUI.It's an Interactive Shell, so all my Linux usersout there, that if you're new to PowerShell,you've had a shell for forever in your environmentsand how you interact with that.

What PowerShell does is it provides the InteractiveShell for our Windows-based environmentsso we can really tell it all kinds of great things,what to do, find us information, configure settings,it does that in an interactive wayand gives us feedback of what's happeningand what we're actually going to be using.It's also for Task Automation.One of the great things about PowerShell,especially when we think aboutthe configurations of servers,we can use this language to actually automateall kinds of great things inside of our environment.And then when you take it to the next stepwith things like desired state configuration,we can then control with PowerShell how a serveris configured, does it stay in configurationand if it does drift, we can have PowerShellactually bring it back to our desired state.

So, there's all kind of great things thatwe can do with PowerShell just from a simpleTask Automation perspective.It's also Object Oriented.And what I mean here is that everythingwe do inside of PowerShell is treatedjust like an object, whether that objectis a service or a process, or maybe just a server.Everything is treated like an objectthat we use PowerShell to describe that object,but we also use PowerShell to configureand work with that object so when you think aboutthis in a language, pretty much everything's a nounthat we're going to work with inside of it.

And PowerShell just wraps around that.In another video, we'll talk about how that comesto be and how to actually read this wonderful language,but it's Object Oriented.Now this also provides a wealth of informationfor our developers because it's basedon the dot net framework.So everything that we have is actually based in code.When you look at some of the commandletsthat we're going to see, you'll see thatdot net functionality come in.So a lot of developers have started usingPowerShell even though you might thinkit's traditionally an IT pro tool,but because of what it does and how it interactsand works with objects, developers findthis very native to some of the languagesthat they program in every day.

Now what are some of the basics of the PowerShell languageand things that you need to know aboutas we start working with this and going downPowerShell and learning it for the first time.First off, you're going to use PowerShellfor consistent, repeatable tasksand the things that we want to do over and overand over again.Now I know, sometimes just looking at a serviceit's easy to go to the GUI and just get that information.But what if you have to do that a thousand timeson a thousand different servers?You want to visit each server every time?Probably not.There's also several built-in providers.And simply, a provider are the things thatwe can ask questions for, that we can interact with.

Remember, PowerShell is an interactive shell,and those providers allow us to work with it.So, some of the providers we have aroundactive directory, the registry,if you're into Windows Management Instrumentation,or WMI, we can do that and we can talk to it natively.We actually use our natural languagewhen we're working with PowerShelland I'll explain how the language works in another video.You may actually already know a little bit about PowerShellwithout even ever playing with it.Because aliases really give us an ability to helpbridge the gap from previous languages.So, let's say for example, you want to lookat what's inside of a directory.

Well, you might run DIR if you're fromthe Linux world you might run LS,if all you've known is PowerShell,you run a thing called Get-ChildItem.So, I'll show you how that works in just a second,and give you an idea of what's happeningwith our aliases and we'll dig into thoseeven more in another video.And the last thing that we want to know about PowerShell,it's built into many products.It's a shipping requirement for mostof the products that come out of Microsoft'sproduction environments, so it's really designedinside of it.It also is in a lot of third-party products.VMware has PowerShell and abilities built into it.

We can do it with Citrix.We can do it with many, many other IT pro tools.So we see a lot of folks really adapting PowerShell.And in fact, PowerShell's already on toits fifth version of this powerful language.So let me just show you what an alias is really quick.And then we'll close out this video.So, let me show you what an alias looks likeinside of PowerShell.I'm just gonna type in LS,it does the directory listing.DR, it does the directory listing.Well, the actual PowerShell commandletis one called Get-ChildItem and if I justrun that commandlet, hey, that's the same thing.

So aliases help you bridge that gap,and oh, by the way, and we'll talk about thisin another video, you can create your ownaliases to make learning a language eveneasier for you.So as you can see, PowerShell providesa wealth of opportunity for you and your environmentsand you may actually already know a little bit of PowerShellwithout even knowing you already did.

Resume Transcript Auto-Scroll

Author

Released

5/21/2016

What is PowerShell? PowerShell is a powerful language used for scripting and automation for your IT Infrastructure. In this short course, author Matt Hester provides an overview of the most current release, PowerShell 5.0, including how to read the PowerShell language and scripts, get help, and use cmdlets.

Matt then dives into PowerShell's functions and What If statements, working with output, and coding in the Integrated Scripting Environment (ISE). The course wraps up with some tips on using PowerShell for both on-premises and cloud deployments involving Office 365 and Azure.