Тёмный
No video :(

PowerShell Master Class - Advanced Scripting Techniques 

John Savill's Technical Training
Подписаться 277 тыс.
Просмотров 52 тыс.
50% 1

The advanced scripting module that introduces functions, creating your own modules and signing scripts.
This is a multi-part class that should be viewed as part of its playlist, • PowerShell Master Class
Materials for the class available at github.com/johnthebrit/PowerS...
00:00 Introduction
00:25 Lazy parameters
02:37 Types of parameter
03:25 Using multiple parameters
05:43 Explicitly define parameter position
07:08 Using different parameter names
08:59 Switches
11:13 Accepting pipeline input
13:40 Enabling help
16:33 Troubleshooting
22:53 Try and catch
27:05 Creating your own modules
30:52 PSModulePath
33:15 More on functions
35:16 Making it a function
37:55 Importing your module
40:00 Signing your script
45:30 Coming up next

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

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@iamdedlok
@iamdedlok 3 года назад
Good stuff John, Legend! Loved the gradual progression from script to Modules. It helped me fill in some gaps in my knowledge! Just back from reading the docs about PSModulePath - Powershell 7 is honouring the PSModulePath changes. Great news! Modules, parameter binding, here I come!
@RDSBL
@RDSBL Год назад
Good video John, nice pace, good bite-sized examples. I’ll be watching more of your lectures now!👍🏼
@thearchibaldtuttle
@thearchibaldtuttle 4 года назад
Thanks for sharing the material!
@amitdubey986
@amitdubey986 3 года назад
Thanks John. You have been an Amazing teacher. I have just started my powershell journey and it has started to appear very easy.
@NTFAQGuy
@NTFAQGuy 3 года назад
Wonderful!
@prasannakumaryr
@prasannakumaryr 2 года назад
He is a master teacher!
@ymsalem
@ymsalem 5 лет назад
Very useful indeed. Thanks.
@MatSmithLondon
@MatSmithLondon 2 года назад
Top presenting style. Basically, musical voice. Reeeeally easy to understand, and makes it very watchable. I rarely read or watch powershell for fun, I'm usually googling in anger when it comes to PS :) Thanks!
@ardenercelik2423
@ardenercelik2423 4 года назад
Real useful. Thank you, this content is helping me a lot at work.
@NTFAQGuy
@NTFAQGuy 4 года назад
Great to hear! Thanks.
@kurchak
@kurchak 4 года назад
( )
@NickRoman
@NickRoman Год назад
curly braces or just braces (since it is the only thing called braces, the adjective is redundant). Language is no where near as simple as 'you guys were first'. Just saying.
@kurchak
@kurchak Год назад
@@NickRoman just a joke
@ibrahimabdeltawab6418
@ibrahimabdeltawab6418 Год назад
So informative! Thanks so much ❤
@shinigamilee5915
@shinigamilee5915 5 лет назад
It's really important to have a debugger. I used to use VBS Edit years ago, just because I could step through the code even I was coding in PowerShell or Python. I did this so I look at the windows objects more completely. Yes, Python has a debugger, but it wasn't as good when working with Windows objects. Now with a proper debugger in Microsoft Code, I don't have to do this anymore. It was a bit of a pain to convert code back and forth but not really that difficult since I have done it for so many years on small projects and frameworks I needed for making my Windows and Linux code work on both platforms.
@deserve_it
@deserve_it 5 лет назад
Very useful and enlightening bundle of lectures . I see it more and more how power shell is a graceful and effective language to resolve all different kinds of problems. Problem is that it is still not such popular as it should be . At my work nor one actually knows how to use it . In a best case the people know that it is exist , sometimes even this knowledge is absent. My boss thought we need install it on Windows. Windows 10 ,I mean. Today everyone use Python. Some folks still use Batch in Windows , I feel a very strong urge to puke whence i am looking at Batch. I personally don't understand how is it possible that people prefer Python above Powershell especially in WIndows environment ? I ready to bet , almost every issue you can resolve quicker in Powershell. Pipes are great for it . You even don't need to read a pile of documentation to receive something , it is enough to receive an excel object and if you know how to use all this truck as Select and Where and so on... you can very quickly to extract what you are looking for. May be it will be not an elegant way but it will be a quick way. Sometimes it is a preferable way , above other ways when you need to spend an hour to investigate this library for to find a function that fits. This truck shall be much more popular and familiar to everyone. It is astonishing how this language makes your life easier. In this lecture I revealed many very useful things , i did it by using another ways, simply because it is difficult to imagine that life may be even more easier . As says my friend in shortly we will go to crap without coming out from bad. But in my opinion it is Great!!
@seanvogel8067
@seanvogel8067 5 лет назад
John, this was useful and well presented. This refreshed my memory on how to write scripts with parameters, enable Help and also create functions that would be available on the command line. Many years ago I found that info on the MS site, but this time I couldn't find it. Thank you. For what it's worth, this is my understanding as an American: ( ) Parentheses [ ] Square brackets { } Braces (or curly braces) < > Angle brackets Mind you, I'm not saying the way you said it was wrong...it's language differences. >chuckle
@NTFAQGuy
@NTFAQGuy 5 лет назад
I'm constantly learning :-) Appreciate the bracket break down :-) cheers!
@djmichaelm3301
@djmichaelm3301 4 года назад
Sean Vogel 100% agree, it’s exactly what I call them all too in the US
@luizzurobski4462
@luizzurobski4462 Год назад
ty
@tobiassjoholm9325
@tobiassjoholm9325 3 месяца назад
Great
@PabloTBrave
@PabloTBrave 4 года назад
You mention wmi had been replaced by cim how would you find out which is the newer/preferred command when there are various options
@badda_boom8017
@badda_boom8017 3 года назад
Try using a cim explorer. It's much easier
@geroffmilan3328
@geroffmilan3328 Год назад
I still debug manually using a separate powershell console - just do not understand how to configure the VSCode debugger or its options. I gave VSCode a fresh try today, but after prompting that it wanted to create a launch.json, triggering a source control change, my script completely failed because the debugger claimed a module was not installed. That module is installed, and the script runs fine in production. I never faced this degree of complexity when debugging Pascal way back in the day!
@markadam1506
@markadam1506 3 года назад
Just to confirm: its either Brackets or Square Brackets :-)
@NTFAQGuy
@NTFAQGuy 3 года назад
LOL.
@calebjoyner528
@calebjoyner528 3 года назад
I got the compinfo ps1 script from your GitHub and tried to run it but it literally does nothing. Pretty frustrating.
@NTFAQGuy
@NTFAQGuy 3 года назад
make sure winrm is configured on your machine.
@calebjoyner528
@calebjoyner528 3 года назад
It is configured, says the winrm service is already running on this machine. WinRM is already setup for remote management on this computer.
@calebjoyner528
@calebjoyner528 3 года назад
I have the ps1 saved to my desktop the directory is set to my desktop, when I enter the .\compinfo.ps1 command it does nothing.
@NTFAQGuy
@NTFAQGuy 3 года назад
check your execution policy. i cover that in modules. if it does nothing there is something else.
@krzydoug80
@krzydoug80 Год назад
also make sure the file isn't "blocked" by right clicking and choosing properties. Down at the bottom of the general tab if there's a checkbox to unblock, check it and hit ok. Since you downloaded the script from the internet, depending on where it's saved, this could be the issue.
Далее
Debug PowerShell with and without VS Code
40:57
Просмотров 19 тыс.
PowerShell Master Class - Data and Objects
46:10
Просмотров 25 тыс.
I Built 3 SECRET Rooms In School!
33:34
Просмотров 13 млн
PowerShell Master Class - Desired State Configuration
36:32
PowerShell Functions
36:06
Просмотров 42 тыс.
PowerShell Master Class - Connecting Commands Together
1:06:50
Getting Ready for DevOps with PowerShell and VS Code
40:28
PowerShell 7 Overview
28:52
Просмотров 24 тыс.
25 nooby Python habits you need to ditch
9:12
Просмотров 1,7 млн
PowerShell Master Class - PowerShell Fundamentals
1:14:50
I Built 3 SECRET Rooms In School!
33:34
Просмотров 13 млн