PowerShell: Creating a User Interface Lesson 1 - Quick & Easy

  Рет қаралды 57,138

Bryan Cafferky

Bryan Cafferky

Күн бұрын

Пікірлер: 49
@pablocruise9514
@pablocruise9514 4 жыл бұрын
Appreciate this. We are a DevOps type of shop. I"m always advocating for more in-house infra tools. This allows us to build them quickly and mod them easily. Please do more!
@paulramasco6769
@paulramasco6769 3 жыл бұрын
I didn't know Marc Maron gave such amazing powershell tutorials.
@MrShaka1221
@MrShaka1221 6 ай бұрын
2 years later. Really top tier comment. Well done.
@christopher8641
@christopher8641 2 жыл бұрын
Out-GridView blew my mind. What an absolute beast of a cmdlet
@zaferaktan7383
@zaferaktan7383 4 жыл бұрын
One of the best presentation on KZbin, kudos and thank you.
@BryanCafferky
@BryanCafferky 3 жыл бұрын
You're welcome. Thanks for watching.
@parkerlumkes8686
@parkerlumkes8686 4 жыл бұрын
I like that you call Powershell a language. I don't think it gets enough credit for the versatility it has. And just like you said, a lot of the videos out there on Powershell are focused on Admin functionality instead of the robust object-oriented capabilities of Powershell.
@BryanCafferky
@BryanCafferky 4 жыл бұрын
Yeah. PowerShell reminds me of Python. They are both robust and highly extensible.
@allancoe123456
@allancoe123456 3 жыл бұрын
just as a small tipp for your viewers .:) if we want to keep things easy/simple (just select a file and click OK) $filename = get-childitem | out-gridview -passthru | select -ExpandProperty Name Write-Output $filename
@zaheerkhan8726
@zaheerkhan8726 4 жыл бұрын
Very Informative and nicely explained. Good work, Thank you.
@jaydigging2009
@jaydigging2009 5 жыл бұрын
Thank you for sharing, very cool useful stuff I can use at my job.
@liresto
@liresto 4 жыл бұрын
I'm starting your videos and loving what I see. Thank you for putting these out into the aether!
@Scooterboy_and_others109
@Scooterboy_and_others109 3 жыл бұрын
At 18:50 you mentioned [int]$uservalue, Typecasting variable as int. Is it possible to add range check as well right there in the code?
@BryanCafferky
@BryanCafferky 3 жыл бұрын
Not as part of the variable declaration but it can be done on function parameters. See devblogs.microsoft.com/scripting/simplify-your-powershell-script-with-parameter-validation/ Also, I cover this in my video about writing functions at about 28:30 kzbin.info/www/bejne/bmSnmmd_nLBgjKs
@deploradorableshirts2089
@deploradorableshirts2089 3 жыл бұрын
Awesome!! Thanks man I'm going to use this
@BryanCafferky
@BryanCafferky 3 жыл бұрын
Great! Glad it helped!
@Scooterboy_and_others109
@Scooterboy_and_others109 3 жыл бұрын
At 17:00 you mentioned about some video series "PowerShell TIPS". Can you please share the URL to those videos?
@Jpsalm91
@Jpsalm91 5 жыл бұрын
Hey there sir! Quick question, do I need to download Visual Studio to create forms in Powershell, or should I be able to create them in the native PS Version 5.1? I do not have VS installed, and by the looks of this syntax below from one of the scripts I was trying out, this is supposed to allow me to create forms without PS being an extension of Visual Studio. For example, the LoadWithPartialName expression will tab complete, but things like the .Text property for my variable come with an error stating that the "property for the object does now exist.", and those propertys do NOT TAB complete which was a red flag for me. [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [Void] [System.Windows.Forms.Application]::EnableVisualStyles() Property Error Example: $Form_HelloWorld.Text = "FixedDialog" (.Text and "FixedDialog" both ran as errors) Any help would be appreciated! I am new to Powershell. Thanks!
@BryanCafferky
@BryanCafferky 5 жыл бұрын
Hi Josh, You can do winforms directly in PowerShell code but it is a bit of work. VS Code and VS do not have a form designer that generates PowerShell code. You can get an extension for $60 calle PowerShell Pro Tools that will give you a designer. You can also use POSHGUI.com for free to generate the code. See my new video at kzbin.info/www/bejne/b6nEZmmehaqBr6c for details on that. You can also buy Sapien PowerShell Studio which has a form designer but that costs a bit more.
@Jpsalm91
@Jpsalm91 5 жыл бұрын
@@BryanCafferky Hey, thanks for the response! It turned out that I just needed to update the .NET Framework again. Why, I dont know, but it work.
@kirksurant2769
@kirksurant2769 4 жыл бұрын
Question: Why is it that line 13 output your name (ie: Its a nice day Bryan) and line 14 only output 'It may rain later $myname' intstead of It may rain later Bryan? Is this an error or did you mean for it to do it like that?
@BryanCafferky
@BryanCafferky 4 жыл бұрын
If you enclose a string in single quotes, variables are not expanded. If you use double quotes, embedded variables are expanded to their values.
@henrikvisby387
@henrikvisby387 4 жыл бұрын
Hi there Bryan, How did you make the GUI for the File list shown at 15:12? Best regards
@BryanCafferky
@BryanCafferky 4 жыл бұрын
I didn't. Its a built-in cmdlet, Out-Gridview. So Get-ChildItem | Out-Gridview will give you that GUI list.
@abdulkadir-jh2yj
@abdulkadir-jh2yj 3 жыл бұрын
EXCELLENT EXPLANATION
@idothings100
@idothings100 3 жыл бұрын
Great video, lots of good information. Thank you.
@UltraGaivalas
@UltraGaivalas 4 жыл бұрын
can PowerShell be used to program AI apps?
@BryanCafferky
@BryanCafferky 4 жыл бұрын
If you mean to perform data analysis and train machine learning models, better choices would be Python or R which have many function libraries to support data science. I have videos on these languages too.
@allancoe123456
@allancoe123456 3 жыл бұрын
Hi Bryan! Hi im a fan of your way of explaining stuff :) I was thinking, you gonna do a series on Microsoft.Powershell.SDK? Like howto nice host your own PS in lets say C# app? Ps the cody stuff if you want help with i can do, but the explain and make sence thats on you dude :)
@BryanCafferky
@BryanCafferky 3 жыл бұрын
Hi Johan, Thanks. There's a lot you can do with PowerShell. Did you see my book on it? A book that is a bit dated but I liked is Windows PowerShell by Douglas Finke www.amazon.com/Windows-PowerShell-Developers-Productivity-Application-ebook/dp/B008JFVXUO/ref=sr_1_5?dchild=1&keywords=windows+powershell+finke&qid=1611072158&sr=8-5 Not sure if there is a newer edition.
@allancoe123456
@allancoe123456 3 жыл бұрын
@@BryanCafferky Thx for the reply! i have developed the client software for manual manage of different (split-brain) dns zones (c# app that hosts a PS runtime). Im now working on pester tests through OVF to ensure the validity of some automation jobs i have written and ofcause to validate the work of some "born to be hackers" + "next next admins" :). Any tips on great material on pester and OVF would be greatly appreciated , otherwise keep up the great job!
@BryanCafferky
@BryanCafferky 3 жыл бұрын
@@allancoe123456 Nice! I've not really used Pester. I took a look at this pester-docs.netlify.app/docs/quick-start It would be interesting to use there on Azure Automation Runbooks.
@TKGZR14
@TKGZR14 3 жыл бұрын
Great job 👌
@pallabba
@pallabba 4 жыл бұрын
Great tutorial. love it
@BryanCafferky
@BryanCafferky 4 жыл бұрын
Thanks
@waqaarahsab
@waqaarahsab 4 жыл бұрын
Where is the download link?
@BryanCafferky
@BryanCafferky 4 жыл бұрын
github.com/bcafferky/shared/tree/master/PowerShellUI/Part_1
@rahildocument2598
@rahildocument2598 3 жыл бұрын
Can you please provide the code which you showing
@BryanCafferky
@BryanCafferky 3 жыл бұрын
Sure. I also added this to the video description. Thanks for asking. github.com/bcafferky/shared/tree/master/PowerShellUI/Part_1
@Attraktor63
@Attraktor63 2 жыл бұрын
Thanks for the lesson... but you're killing me with amount of times you mispronounce "et cetera". It's ET-Cetera, not ECK-Cetera.
@maddvldg
@maddvldg 5 жыл бұрын
Where is Part 2?
@BryanCafferky
@BryanCafferky 5 жыл бұрын
I justed added Part 3 thinking I did Part 2. Doh! I will backfill part 2 but here is the link to the next video in the series. kzbin.info/www/bejne/b6nEZmmehaqBr6c
@vrnjcanin
@vrnjcanin 4 жыл бұрын
Title of the video has nothing to do with it's content.
@BryanCafferky
@BryanCafferky 4 жыл бұрын
Did you watch it? I explain that it is part of series and this one leverages existing PowerShell cmdlets to create a simple user interface (UI). What are you expecting?
@vrnjcanin
@vrnjcanin 4 жыл бұрын
@@BryanCafferky I stumbled upon this video searching on how to create ui in powershell. This video didn't provide answer to that question, and I had to look for it somewhere else. Suggestion for title: PowerShell: Creating a User Interface Series, Part 1: Building Blocks. Video is not bad, it's just not what promises to be (based on title itself). Just my 2 cents.
@BryanCafferky
@BryanCafferky 4 жыл бұрын
@@vrnjcanin Sure and thanks for the feedback. The problem is what kind of user interface and using what tools? A UI does not need to be graphical, i.e. not GUI. You can do a GUI with PowerShell using WinForms and nothing else which is labor intensive, or you can buy PowerShell Studio and get a full GUI dev environment, or you can use POSHGUI and build the GUI for free online, and you might decide you want to build a GUI on WPF which is completely different. VSCode has a paid add-in extension to build GUIs. And then there is using WPF rather than Winforms but this is more clunky to work with. Which did you do?
@vrnjcanin
@vrnjcanin 4 жыл бұрын
@@BryanCafferky My goal is to build graphical interface and I wanted detailed explanation of all parameters for creating it. In other words, explanation of code that POSHGUI generates and how to write it myself.
@BryanCafferky
@BryanCafferky 4 жыл бұрын
@@vrnjcanin Ok. This looks like a good one. kzbin.info/www/bejne/h5nCpKSwob2YerM And part 2 kzbin.info/www/bejne/fYK2gpipl9xmeJI Actually, this guy looks like he does a good job covering that is detail. Hope this helps. kzbin.info/www/bejne/fYK2gpipl9xmeJI
PowerShell:  Creating a User Interface Lesson 2 - Using PowerShell Studio
1:03:45
PowerShell: Writing  Functions
33:11
Bryan Cafferky
Рет қаралды 41 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 7 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,4 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 54 МЛН
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
The Ultimate PowerShell
13:38
Chris Titus Tech
Рет қаралды 63 М.
PowerShell Windows Forms Tutorial 1 : Hello World
21:01
SX86 - PowerShell.toGUI
Рет қаралды 57 М.
Tkinter - Pygubu Designer - The Basics
21:04
JobinPy
Рет қаралды 23 М.
Python GUI Development With PySimpleGUI
15:15
Real Python
Рет қаралды 1 МЛН
Introduction to Scaling Analytics Using DuckDB with Python
29:33
Bryan Cafferky
Рет қаралды 3 М.
40 Windows Commands you NEED to know (in 10 Minutes)
10:54
NetworkChuck
Рет қаралды 3,4 МЛН
PowerShell Tutorials Making HTML Reports #1 : Basic HTML Reports
17:07
JackedProgrammer
Рет қаралды 4,2 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 7 МЛН