Learn PowerShell: Episode 9, Debugging + Select + Looping

preview_player
Показать описание
In this 40-minute long episode, we're going to continue our exploration through PowerShell. This episode has a lot more practical stuff in it, getting the experience of putting together scripts for PowerShell!

And we also pray to our lord and saviour, "johm" ;)

This episode starts with debugging, as well as some recap on "if" statements from the last episode, which is quite a new tool we haven't seen, and definitely something helpful for learning PowerShell further and writing more complex scripts.

Then we start looking at "Select-Object", which is one of the most flexible commands in the entirety of PowerShell.

And finally, we learn about a brand-new concept, known as "looping", which is where we'll learn about "while" loops - a very important concept.

"If" Programming Tasks:

If (haha get it) you're not familiar with if statements from other languages, here are a few tasks you can try to practice your use of them:

1. Calculator -

Make a simple calculator script that asks you to input two numbers and then asks you to choose either "+", "-", "*" or "/". Depending on which of those the user choses, it does that operation.

Tip: You'll need an "if" to check whether they entered is a "+", and another to check if it's a "-" etc. And then write some code in each "if" to do the correct operation.

2. String Length Comparer -

Make a program that gets you to enter in two strings, and then use if statements to compare the ".Length" of them and say which is longer

Tip: You'll need one if to check if the first is longer, one to check if the second is longer, and one to check if they're the same.

Chapters:

0:00 Debugging + Recap
4:10 elseif
8:38 Select-Object
12:44 Export one property to CSV
16:40 Looping + Where
20:45 Repeated Input Script
25:23 The Ultimate Script (not really)

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 ABWorld over the years.

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

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

Really enjoying your series on Powershell. Your presentation style is the best on YT.

Syafka
Автор

Man, you have a gift. Thank you for explaining how to use Select and the difference between using Select and ForEach. You are a hero sir

TheEmperorXavier
Автор

I think I owe all of you an apology - it's been _3_ _months_ since the last episode - and that's far too long. In my best attempt to make up for it, the video is a solid *40* minutes long and packed full of animated segments - so enjoy the extra-long episode!

There have been some things going on in my life right now that have been severely slowing my progress on making episodes, if you just look at the recording date in the corner, it's honestly quite shocking.

However, there is good news: This shouldn't last much longer! The things that are slowing me down right now are the very things that will hopefully turn this channel around next year - possibly even bring it to a near-fortnightly schedule!! For now though, enjoy the 40-minute video :)

ABCo-ABMedia
Автор

Thank you so much for this series! You obviously put a lot of effort in each episode, and I really appreciate how you can teach us the fundamentals while keeping us busy with entertaining and practical problems. Can't wait to see the next episodes!

michelcroz
Автор

Very underrated series that I'm glad I found! Hopefully this is the beginning of my greatness via powershell. Thank you, King.

BAdinkersGaming
Автор

Thank you so much for the very informative and practice oriented PowerShell tutorial, this really helps.
We are waiting for the rest of this series.

Thanks Again!!

sunilsjk
Автор

Thank you for the course, i appreciate the work u put in 👌

Keyslayer
Автор

By far the best videos I’ve watched on learning PowerShell! Thank you!!

katmatt
Автор

I've just finished the course, I just want to thank you for helping me to write my first scripts and also for motivating me to keep learning PowerShell and coding. I'm looking forward to seeing more episodes on this series, or even on another language (if I can choose I would say Python). Thanks again and all the best to you! cheersss

sinestesiagarcia
Автор

Excellent series; clear explanations and examples. Thanks!

georgeseese
Автор

Thanks you for your episodes. Really helpful! I learned powershell by reading some books before, but your videos bring me dipper into it. Thanks.

kipmirtle
Автор

Hi! Do you plan on continuing this series at any point in the future? Maybe something more geared to Active Directory? You're teaching style is amazing and your lessons on PS are the best on Youtube by far. Thanks.

nb_nyc
Автор

Thank you for this super useful course.

mosrourtafadar
Автор

Ended this course within 2 days. Found it super helpful and great confidence booster! Appreciate your efforts and approach!

patilfamily
Автор

This series really helped me alot can't wait for next episode and thank you 🙏 much

traderzhou
Автор

Thank you, this series really helped me.

saratharavind
Автор

Thanks for tuts, you make it looks simple and easy to learn x)

sratnatozmrde
Автор

Thank you for the great tutorial. The behavior of Export-Csv at 13:00 surprises me. I had assumed that $proc | ForEach {$_.ProcessName} | Export-Csv bad.csv would simply put the list of ProcessName into the csv.

History_etc
Автор

Just started following this series and noticed example links no longer work. Is there any chance it can be fixed? much appreciated.

sahanjayarathna
Автор

is it the last part ? or we will get more videos

minformationcenter