Тёмный
No video :(

PowerShell Master Class - PowerShell Scripting 

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

The introduction to scripting module in the PowerShell Master Class which introduces scripting basics.
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:23 Regions
02:02 Signed scripts
04:42 First script
08:47 Execute script
09:34 Write-Out vs Write-Host
16:43 ' and " difference
18:38 Prompting the user
20:15 Script with input
24:12 Script with mandatory input
27:39 Script with different output
32:25 Coming up next

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

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@iamdedlok
@iamdedlok 3 года назад
Thanks John! Great content. I grew few brain cells in the last 30 min. Watching your content daily for 30min in the morning is the new 'discipline' I have been building :D On to the next 'Advanced Scripting' vid!
@NTFAQGuy
@NTFAQGuy 3 года назад
Fantastic!
@oscargarza6869
@oscargarza6869 4 года назад
You did a great job with this video. I enjoyed all of the information. Thank you!
@washingtonalmeida75
@washingtonalmeida75 2 года назад
Great tutorials, John. Very educative! Thank you.
@ornellaputti6691
@ornellaputti6691 2 года назад
Excelent video! So well explained, just loved it, keep it up!
@bjorndennenbroek1284
@bjorndennenbroek1284 5 лет назад
Thank you, these video's are a tremendous help.
@didierfolly
@didierfolly 4 года назад
Thank you, a great video again!
@ezathel9294
@ezathel9294 2 года назад
Thank you very much for the video! Very well explained, helped a noob like me quite a lot.
@ibrahimabdeltawab6418
@ibrahimabdeltawab6418 Год назад
So informative! Thanks so much for your efforts
@JackassGaming91
@JackassGaming91 3 года назад
Thanks again John ! Hopefully you can do more powershell video like how workflow, begin, process, finally works
@NTFAQGuy
@NTFAQGuy 3 года назад
I’ll look at some new topics :)
@Codyyyyyyyyyy
@Codyyyyyyyyyy 5 лет назад
Great video! Thanks
@flatbill2
@flatbill2 2 года назад
I went through the Microsoft powershell training tutorial. You gave me a lot of good information.
@NTFAQGuy
@NTFAQGuy 2 года назад
Glad it was helpful!
@MrMahiyadav
@MrMahiyadav 4 года назад
I am not a coder and more from the ops b/g ... and I loved your video... very clearly made and I didnt find it diffcult to understand the script/code here...BIG THANKS :)
@NTFAQGuy
@NTFAQGuy 4 года назад
Great to hear, thank you
@chaminda512
@chaminda512 9 месяцев назад
Learn something new every time. thank you so much..!
@NTFAQGuy
@NTFAQGuy 9 месяцев назад
My pleasure!
@VishnuKamath
@VishnuKamath 3 года назад
Loved the Tutorial. Awesome work.
@NTFAQGuy
@NTFAQGuy 3 года назад
Glad you liked it
@alishavez
@alishavez 5 лет назад
Good stuff John.
@NTFAQGuy
@NTFAQGuy 5 лет назад
Thanks :-)
@sakthipro_YT
@sakthipro_YT 3 года назад
No matter how many times i thank, they all look insufficient. Excellent Work!!
@NTFAQGuy
@NTFAQGuy 3 года назад
Very kind, thank you.
@yusril-ihsanul-alim
@yusril-ihsanul-alim 2 года назад
Very helpfull!
@aumpauskar4653
@aumpauskar4653 3 года назад
If you code doesn't run in powershell, and shows "cannot be loaded because running scripts is disabled on this system", copy and paste this: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
@zt.5677
@zt.5677 3 года назад
Dear John. Funny thing is: I have just seen your motivational on discipline, and I thought: is it discipline that after my SQL examination, I return to John's PowerShell Class to continue and finish them?
@NTFAQGuy
@NTFAQGuy 3 года назад
:-)
@pgrinius
@pgrinius 3 года назад
Hi John, what a great video! Superb quality and straight to the point. I noticed, that Write-out at 29:38 outputs Version before Procs, which is the opposite of how you set up the $paramout hashtable. What’s the reason for that?
@NTFAQGuy
@NTFAQGuy 3 года назад
Thanks. Hash table is a collection of values, how its output does not have to match. I could control the output format if I wanted to but didn't in this example.
@TheMarcosmf
@TheMarcosmf 4 года назад
Where could I find the concept of Parameters and Strings? I watched PowerShell Fundamentals and I couldn't find it there. I supposed was here.
@NTFAQGuy
@NTFAQGuy 4 года назад
Next part in series. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BVU7MxlyMmA.html
@1duducm
@1duducm 3 года назад
thankssssssssssssss
@patrickwilliams7210
@patrickwilliams7210 2 года назад
I noticed on your section at 8:58 you include the execution operator '&' it doesn't appear that you need that for the script to work.
@badsector82
@badsector82 9 месяцев назад
What's the difference between "Write-Output" and "return" in a function?
@badsector82
@badsector82 9 месяцев назад
What if I have script to do a task for a million users, for example and I want to have a progress shown on the screen. Should I use "Write-Output" as it can possibly mess with the pipeline, and I have had such cases, or I am allowed to use "Write-Host"?
@pallabkolkata
@pallabkolkata 3 года назад
@john savill John when i try to run the Mod4script2.ps1 in my machine i get the below error : PS C:\Pallab\ARM_JSON> .\pwsh1.ps1 CA-LJ8M0JR2 Get-CimInstance : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". At C:\Pallab\ARM_JSON\pwsh1.ps1:5 char:19 + ... in32CSOut = Get-CimInstance -ClassName win32_computersystem -Computer ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ConnectionError: (root\cimv2:win32_computersystem:String) [Get-CimInstance], CimException + FullyQualifiedErrorId : HRESULT 0x80338012,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand + PSComputerName : CA-LJ8M0JR2 Get-CimInstance : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". At C:\Pallab\ARM_JSON\pwsh1.ps1:6 char:19 + ... in32OSOut = Get-CimInstance -ClassName win32_operatingsystem -Compute ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ConnectionError: (root\cimv2:win32_operatingsystem:String) [Get-CimInstance], CimException + FullyQualifiedErrorId : HRESULT 0x80338012,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand + PSComputerName : CA-LJ8M0JR2 But i have my variable outputs already listed properly please find below : PS C:\Pallab\ARM_JSON> $paramout | fl Name : Version Value : 10.0.17763 Name : ComputerName Value : Name : Memory Value : 17034072064 Name : Free Memory Value : 7101636 Name : Procs Value : 1 Can you tell me why it's throwing error if i am running the script in totality and how to fix it
@NTFAQGuy
@NTFAQGuy 3 года назад
check the firewall is open etc. it can't get to the machine.
@pallabkolkata
@pallabkolkata 3 года назад
@@NTFAQGuy Yes it is my local laptop only. I ran the below command got this : PS C:\Pallab\ARM_JSON> Get-CimInstance Win32_ComputerSystem Name PrimaryOwnerName Domain TotalPhysicalMemory Model Manufacturer ---- ---------------- ------ ------------------- ----- ------------ CA-LJ8M0JR2 Windows User groupinfra.com 17034072064 Latitude 5590 Dell Inc.
@PaulBunkey
@PaulBunkey 4 года назад
About "Just don't use it" - I don't support boycotting a language command. You just need to understand pros and cons and use an appropriate command. (As I see it) Write-Host is only useful if you want to make output more readable for user, staring at the console. If you always write to log and never need to inform a user about the process or give beautifully readable result, with important parts jumping to the eye, so yeah, never use Write-Host.
@cybercastor6873
@cybercastor6873 2 года назад
@ 9:35 + The damning argument on using Write-Host/Write-Output. Why are people so extreme as to say 'never use Write-Host', '' It breaks the flow ...'', it's a sin, etc... Why not say It's a UI-Only function and use it for formating only. Which is what it is. You need to trust the scripters to write properly, NOT provide a function and tell don't use it. I use Write-Host extensively in my script when outputing UI-only data in a formating I enjoy. It's pretty clear cut; the rare occasion a function returns a string, it uses Write-Output (stdout). Write-Warning and Write-Error cannot be used as replacement to Write-Host, for obvious reason, that suggestion is meaningless.
@NTFAQGuy
@NTFAQGuy 2 года назад
I think it’s stressed as people are first learning so they get a good pattern. Once they are more experienced they can then look back and say, hey it’s useful in these situations.
@radicaltronic1855
@radicaltronic1855 2 года назад
tes
Далее
Склеил девушку-курьера ❤️
01:00
Мой инстаграм: v1.ann
00:13
Просмотров 93 тыс.
PowerShell Made Easy
25:39
Просмотров 95 тыс.
PowerShell Master Class - Desired State Configuration
36:32
Learn PowerShell in Less Than 2 Hours
1:48:21
Просмотров 257 тыс.
Getting Ready for DevOps with PowerShell and VS Code
40:28
PowerShell 7 Overview
28:52
Просмотров 24 тыс.
PowerShell Master Class - PowerShell Fundamentals
1:14:50
Learn PowerShell Automation in Less than 1 Hour
43:17
PowerShell Master Class - Automation
46:06
Просмотров 28 тыс.
Склеил девушку-курьера ❤️
01:00