PowerShell Scripts
HTML-код
- Опубликовано: 11 июл 2024
- Learn how to create and run PowerShell Scripts. In this episode of Learn PowerShell I live code a PowerShell script from start to finish. Follow along to see the thought process and workflow that goes into scripting PowerShell solutions and writing your own PowerShell scripts.
Corresponding TechThoughts write-up:
www.techthoughts.info/powersh...
▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
00:00 - Intro
00:26 - Live coding a PowerShell script
43:06 - Executing PowerShell scripts
48:00 - Outro
Learn PowerShell - Episode 10 - PowerShell Scripts
Reference PowerShell code examples from this episode:
github.com/techthoughts2/Lear...
Check out the complete Learn PowerShell RUclips Playlist:
• Learn PowerShell
~
/ jakemorrison
My recommended books for learning PowerShell:
(these affiliate links cost you nothing extra and help support this channel)
- Learn PowerShell in a Month of Lunches: amzn.to/3mlbizz
- Learn PowerShell Scripting in a Month of Lunches: amzn.to/3MtxJxe
- Windows PowerShell in Action: amzn.to/3xkjGp4
- PowerShell Cookbook: amzn.to/3tgCq6F
How to create a Telegram Bot: • How to Create a Telegr...
If you are able, and found this content valuable, please consider a secure donation in the link below. Your contribution helps offset the costs of producing this PowerShell series. Much appreciated!
www.paypal.com/cgi-bin/webscr...
Learn PowerShell online free in this operationally focused PowerShell series. These PowerShell tutorials are designed to get you ramped up and using PowerShell quickly. Each episode provides practical PowerShell examples for using PowerShell in the real world. Whether you are a PowerShell beginner or seeking advance PowerShell training, this Learn PowerShell series covers the topics you'll need to be effective with PowerShell!
These videos were recorded on a lot of my older equipment.
My newer videos use the following equipment:
- Camera: amzn.to/3MsjQPu
- Lens: amzn.to/3NrsKhJ
- Teleprompter: amzn.to/3monqQc
- Mic: Audio-Technica AT2035
- Mic Preamp: amzn.to/3tlOvY6
- Mic Arm: amzn.to/3NXJTiP
- Audio Interface: amzn.to/3xqPqJu
- Lighting: amzn.to/3O1Z2zR
- Rear color lighting: amzn.to/3H5MIMI
#learnPowerShell #PowerShell #PowerShelltraining #PowerShellTutorial - Наука
Hey man, you are one hell of a teacher! Your walk-through is extremely clear and thorough! I especially love the way you break down your thinking when planning the structure of the script. Very very good! Keep the videos coming, cause I’m learning a lot.
I just finished one of my first really useful scripts today and boy, was that satisfying! Can’t get enough of scripting so I look forward to the next lesson.
THANKS!
Thank you for including the thought processes
Amazing video, this series is probably the best on RUclips. Thank you so much for your hard work
It's crazy how good this video is.
Thank you for this series. Your presentation is very clear and easy to follow.
Very informative, detailed and with good instruction to follow!
Brilliant Course! Best on RUclips by a country mile
Wonderful lesson. Thanks for that!
interesting lesson, easy to follow along :)
Great lesson!
Excellent video, sir!
Great video! I made the info and errors display in the Powershell command prompt as well with the write-host command and added dates to the logs with $date = Get-Date.
Amazing explanation...Thanks Man..
Awesome Tutorials....! Thank you very much..... 🤩
Excellent video! Talking through your process was very beneficial.
Glad it was helpful!
Crystal clear 💎
This is a great Video. I'll follow you and learn from you. PowerShell is now very interesting to me.
Amazing video thank you
Very good thanks
Great explained job Bro
I have never seen like a video like this..it’s a great explanation😊😊😊really really thank you for the video
Glad it was helpful!
Hands down the best series on Powershell.
One of the best, check out don jones. Also other RUclipsrs I can't remember their names
Great job, This is golden, I hope you are okay, recently discover your channel and your job and you are helping my a lot.
Sorry English is not my mother language.
Is very interesting the part you mention about the cronjob and the section with linux, Will be amazing watching you in more videos.
Thank you, bro !)
You're welcome!
Excellent video here. Love the thoroughness and checking of your logic and “showing your work”. I have a question though... instead of using Param could you also use Read-Host to get the users input? That’s typically how I handle it but I appreciate knowing to use param now.
Superb
감사합니다 선생님
Another thing you could have done was put a time stamp for the errors so you would be know when the error occurred.
Great suggestion!
Hello man, this playlist is amazing. Question what's the extension for splatting? tks
Maybe I missed someone else saying this but at the verify Poshgram section around 19:35 or so, you have the [Error] marked as [Info] in the downloadable documentation. I suppose it really doesn't affect the script but thought I'd mention it.
TY for the great content.
Amazing lesson, you present this in such a great and simple way, it makes sense and easy to understand, this is coming from a totally brain dead guy, you got me interested in this topic as Im watching all of the videos on your channel now, instantly subscribed and liked for sure, well done sir
From a text file I want to import the information into an Excel box to fill in certain set fields. Is it possible to do that?
Thanks!
I've always been better in reading scripts than actually writing, but this has been very useful around the thought process. A bit like requirement gathering 🙂.
Also, where can we located that splatting module for VS Code? TIA.
Its requires a bit of advanced setup, but here is the tool that allows converting to splat: github.com/SeeminglyScience/EditorServicesCommandSuite
Awesome video series. I've truly enjoyed it. Had a question around the [4:11] what is that powershell terminal window and how do you get it configured like that?
He customized his PowerShell profile..
Hope we will get one video on the same "how he had done that.."
Windows Terminal.
There is an excellent series on how to get it customized here:
www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh
Great video, I think you missed one throw! Should there have been one if PoshGram couldn’t be loaded? You logged it but wouldn’t the script have then tried to send the message anyway?
EXCELLENT catch, and one that speaks to your PowerShell capability! I've corrected it on the course's GitHub: github.com/techthoughts2/Learn-PowerShell-Code-Examples/blob/master/LearnPowerShell/EP10%20-%20PowerShell%20Script.ps1#L121
I like your style. Also what theme is that for vscode?
marketplace.visualstudio.com/items?itemName=vangware.dark-plus-material
EP9 done! 3:59am, now I'm going to bed for sure. RUclips autoplay EP10...¿They are gonna script from scratch and message me if any windows or linux server is below 20% space? I will need more soda and more jumping jacks...Damm YT autoplay. I can't get no sleep.
You need help
Hi what's the name for the plugin for ConvertToSplatExtension? Can't find it on VS Marketplace.
github.com/SeeminglyScience/EditorServicesCommandSuite
silly question. but what keybind you open the "select command" in vs code
I'm not sure I understand the question, can you provide additional detail?
My brain hurts but i am learning
Why you made a if for windows/linux and used get-volume on windows if Get-PSDrive works just fine on Windows, I just tested on PS 7.3 and 5.1 both works just fine.
Get-command _Module Poshgram shows nothing. Please help
Can't seem to get ConvertToSplat working. Even after installing EditorServicesCommandSuite from gallery and adding it to VSCode Profile. It just doesn't come up after installing and when i search in the Command Palette. Anyone else having same issue?
It can be quite tricky to get working.
First, as of today you have to install the pre-release version:
Install-Module EditorServicesCommandSuite -Scope CurrentUser -AllowPrerelease -RequiredVersion 1.0.0-beta4
Then you have to add this to the VSCode powershell profile:
if (Get-Module -Name EditorServicesCommandSuite -ListAvailable) {
Import-Module EditorServicesCommandSuite -ErrorAction SilentlyContinue #workaround
Import-Module EditorServicesCommandSuite
Import-EditorCommand -Module EditorServicesCommandSuite
Import-CommandSuite
}
The install module won't do anything with me why?? I tried to test if it's installed but also nothing only the find module would work
What error are you getting?
Are you running as admin?
@@Techthoughts2 yup as running admin as for errors I'm getting nothing it just won't work 😟
@@immortal9929 same here
what if you do not show Platform in windows at the terminal screen?
I'm not sure I understand the question, can you provide additional detail?
Powershell 5 does not show platform with $psversiontable. This tutorial is based on version 7.
Life is so much easier if you can get an imsi catcher lol
When new video ?
Soon!
wait won't the \ in linux is an escape character ? that won't work in "$logpath\
is it possible to create a programming language with powershell if possible how to create it
I found treasure
everytime he says log take a shot
Most of the video said nothing about how to get this script to run automatically from time to time
It just makes no sense to send message to telegram when the user initiates this script manually anyway.
You can tie it to scheduled task or cron job.