Learn PowerShell: Episode 11 FINALE, Parametered Scripts + Scoping + Modules

preview_player
Показать описание
After 2 years of making PowerShell videos, we have finally come to the very last episode! In this episode, I cover the final topics I wanted to get through in the series *and* follow that with where to go in the future of this series.

This episode starts with us making a brand-new script from scratch using a new concept we've never covered before - putting Param blocks on scripts. I cover why you'd want to put Param blocks on scripts and demonstrate it by actually making the script. I also take the development of this script as an opportunity to talk even more about developing scripts.

During this stage, I also cover a really annoying behaviour of PowerShell that I think is significant to talk about. I talk about how PowerShell does a very bad job of handling casting objects from the type "string" to the type "FileInfo", and why we should prefer "string" when setting up parameters on scripts or functions.

After this, I move onto a new concept: Scoping. How it impacts our scripts and how we can control it. I go through an example script comparing what we'd expect if there was no scoping to what actually happens due to scoping and covering the "dot-source operator" and code management. I covered this topic because I know it's something that can really trip you up without explanation if you start writing more complex scripts, and I wanted to make sure you had a name to put to the behaviour if you ever encounter it.

As I'm talking about the scoping system, I also explain a common technique the dot-source operator is used, for creating scripts that contain purely functions and using the functions from them. And finally, the scoping portion of the video brings me to explaining PowerShell Modules.

Right at the end of the video, I summarise where to go from this series onwards, and conclude the series there.

CHAPTERS

00:00 Param Blocks on Scripts
06:37 The Final Script
18:08 Caveat to taking in "FileInfo"
22:42 Scoping In-Depth
28:31 Controlling Scoping (Method 1)
30:26 Controlling Scoping (Method 2)
32:50 PowerShell Modules
40:40 From this series...

Thanks for watching my video, before are some general ABMedia links if you are interested:

The Discord server is a place to chat with the creator of this video, as well as anyone who contributed to its development and has helped support ABCo over the years.

A huge thank you goes to @ndumiphotos (on Instagram) for the graphics used in the intro.

#powershell #powershellscripting #learnpowershell
Рекомендации по теме
Комментарии
Автор

I'm on Episode#3 .... ive searched for a million powershell guides so far and they all bore the life out of me.... its either so basic or pointless its unreal but since i found episode #1 mate its been a god send.... explaining | made it so friendly it was pog. I can use Where and ForEach now without issue.... i havent gotten to episode #11 yet apart from this recommendation from YT but i want to thank you in advance for the content... i can see its been 6 months but please dont lose interest in posting... the way you break stuff down is the best ive seen. Thank you.

proxeh
Автор

This the best PowerShell series, I tried learning it through other series and methods but this has been the most useful one by far. I think you absolutely suceeded in your goal of making the best powershell content on youtube.

edit: would it be too much to ask for a bloopers video on this series ^_^

TlatoaniItzcoatl
Автор

Thanks man... I've seen other powershell tutorials, but never really got why most of the stuff works as it works, but I've finished all your videos and I really got the feeling that I know much more know. Best powershell video tutorial I've seen so far. And I've been looking....

rmpd
Автор

Hey bro just wanted to thank you for your content, i went from knowing absolutely nothing in PS to being able create my own scripts, this content is golden.

CarlosLopez-mxhq
Автор

Thank you! This was an awesome series! I really appreciate your time and effort on this!

barrykendrigan
Автор

Thank you so much. I feel happy to see this last episode drop

evaodum
Автор

best explanation ever about powershell . thank you

luismarrero
Автор

Absolutely great!. The very 101 stuff about Powershell core components that is missing in other tutorials or videos are so well explained here. Makes you now understand stuff that you've done for years without really understanding why and more importantly why it sometimes "mysteriously" doesn't work.

rolfohman
Автор

Thank you so much. I have much to learn but feel like I have a much better understanding of PowerShell now.

michaelrafferty
Автор

Thanks Alex!! - I am very Impressed with your visual presentation style - by far the best on YouTube! - I will watch your PowerShell series again - I found the in-depth detail went 'over my head' first time through - 'Learn to Program in PowerShell' by Niklas Borson, must be mentioned, Absolutely invaluable stepping stone to grasping detail before re-watching certain tutorials. Viewpoint of a 76 year old of dubious intellectual stature.

kimroyph
Автор

Dear Alex, Thank you for your time and help. This is by far the best powershell Learning Series i have ever watched. this has all the things that a beginner needs to know about powershell. I have just finished watching, all of your eleven episodes.The way you teach, the knowledge you share make you the best.I appreciate you unique teaching style. all the best....

iknwnthing.
Автор

Thanks finally comleted this series and it's a good reference for us.

kelvinchua
Автор

you did explained it really really good, i totally enjoyed your PS series

emmanuelpaniagua
Автор

Fantastic series 👌🏻 thanks for all the videos. The graphical PowerShell idea video sounds good 👍🏻

RPG_ash
Автор

Thank you for making it easy for us to learn.

edwardaragon
Автор

Maybe I was lucky enough to find it on the first try but this made me a lot comfortable with power shell

vedanshsushilshrivastav
Автор

It is been a long waiting episode...
Your course content is great and easy to get along...
Thank you and appreciate your efforts ❤

sunilsjk
Автор

It's funny comparing the quality of the graphics/editing on this video compared to the first, what a step-up it all is, the difference 2 years can make eh.

ABCo-ABMedia
Автор

Hi, can you explain why at the 26:00, you don't need to have the param block for $name?

ventin