Тёмный

Learn PowerShell: Episode 5, Parameters + C# Descriptions + Overloads 

ABMedia
Подписаться 4 тыс.
Просмотров 10 тыс.
50% 1

Опубликовано:

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@farzadparsamehr8335
@farzadparsamehr8335 2 года назад
the best powershell scripting teaching in youtube
@jobinnelson
@jobinnelson 2 года назад
You are great teacher
@ABCo-ABMedia
@ABCo-ABMedia 2 года назад
Glad you think so!
@yasasvidevops9240
@yasasvidevops9240 3 года назад
Great content and cool presentation skills, like the "Lets rewind in Time" voice-over
@ABCo-ABMedia
@ABCo-ABMedia 3 года назад
Haha yeah I thought that was a neat thing to throw in there
@robertbatista50
@robertbatista50 Год назад
16:55 yes, another nice touch is to place the time in the section of the video where you are referring back to. It’s at 7:07
@robertbatista50
@robertbatista50 Год назад
Thoroughly enjoying the series!!
@diwu7001
@diwu7001 2 года назад
Very helpful tutorial on PowerShell! Clearly explain the details which are great for beginners.
@LocTran-ox9zj
@LocTran-ox9zj Год назад
Such a great teacher i ever met
@ABCo-ABMedia
@ABCo-ABMedia Год назад
Thank you! I'm glad you're enjoying the series
@BarrySwords
@BarrySwords 5 месяцев назад
Really great video series, you're a great teacher and we can tell you know powershell inside and out!
@ABCo-ABMedia
@ABCo-ABMedia 5 месяцев назад
Thanks! Glad you're liking it!
@MunnyLerner
@MunnyLerner 9 месяцев назад
Great exercise to compare the simple version with the more technical method which leads to a great understanding of the mechanics. Really great tutorial series!
@juansanchez6685
@juansanchez6685 Год назад
Fantastic video!
@manum8170
@manum8170 Год назад
This is some very nice stuff. Thx
@ABCo-ABMedia
@ABCo-ABMedia Год назад
Thanks!
@qrnasr246
@qrnasr246 2 года назад
Amazing
@smokeydeadwood7303
@smokeydeadwood7303 3 года назад
Nice vid
@ABCo-ABMedia
@ABCo-ABMedia 3 года назад
Thanks
@sratnatozmrde
@sratnatozmrde 2 года назад
hi mr. @abmedia, i would like to ask if there is any website with tasks/assignments where you can learn on examples?
@ABCo-ABMedia
@ABCo-ABMedia 2 года назад
Unfortunately I can't think of any off the top of my head, but I'm sure if you search you'll find some - good luck!
@Adnan_Laghzaoui
@Adnan_Laghzaoui Год назад
Is it me or aint no exercise in the description as said @25:45 ? :/
@ABCo-ABMedia
@ABCo-ABMedia Год назад
Yeah haha, as it says in the description: "I lied, there is no extra task! All the "physical stuff" of creating tools has been moved to the later episodes, so stick around for that."
@robertbatista50
@robertbatista50 Год назад
Based on where you left off at 23:01, I immediately completed the task with ls | % { $_.GetType() } | where { $_.Name -eq ‘DirectoryInfo’} Of course it is not as elegant as your solution
@ABCo-ABMedia
@ABCo-ABMedia Год назад
Yep, that'll certainly leave you with only directories, really great progress! The Where works great, good job on that, I'm glad you're getting how properties work and everything! The only problem with doing the final task this way is that "% { $_.GetType() }" you have is throwing away the original file/directory objects. As soon as that foreach finishes, all it leaves you with are a bunch of Types, which you can't do file operations to. So yes, as you do, you can then go and filter those Type objects down to just the ones that say "DirectoryInfo" like you do, but in practice, you wouldn't actually be able to do anything with the result from this, because your original file objects were gone as soon as that foreach ran. This command just leaves you with a bunch of, identical, DirectoryInfo types, which you can't do any operations to. But we can fix that really easily! Instead of transforming all the file/directory objects into Type right at the beginning, by moving the ".GetType()" inside the Where, getting the _where_ to do it as part of its checking process, that will leave us with the real directory objects! ls | Where { $_.GetType().Name -eq 'DirectoryInfo' }
@robertbatista50
@robertbatista50 Год назад
Thank you so much for this series and for your detailed reply.
@LOOregano
@LOOregano 2 года назад
Great video! I tried your challenge and came up with another way to get the directory listing using the where command to query the Name. I actually thought that was where you were going but then you showed another method to emphasize a deeper understanding. This is what I found works too: ls | where { $_.GetType().Name -eq 'DirectoryInfo' }
@ABCo-ABMedia
@ABCo-ABMedia 2 года назад
Yes! That too will work, and I was hopeful that a few people would indeed find their own way by taking advantage of everything that's there. There's often many different ways you can approach something, and I knew that this was also a way you could go. I went for the [type] way because it's not something you'd necessarily think of, and as you say, it really hones in what that [type] means, that's the only reason I went for that. But anything that works, works :)
Далее
Bro's Using 3 Weapons
00:36
Просмотров 3,6 млн
Learn PowerShell: Episode 4, Types + Methods + Casting
28:55
C++ for C# and Java Developers
39:47
Просмотров 23 тыс.
Learn PowerShell: Episode 1, The Basics
26:43
Просмотров 96 тыс.
Learn PowerShell: Episode 2, Going Further
23:18
Просмотров 26 тыс.
C# in 100 Seconds
2:27
Просмотров 2,1 млн
PowerShell Remoting
37:12
Просмотров 72 тыс.
Learn PowerShell Automation in Less than 1 Hour
43:17