Taking Control with PowerShell Logic

  Рет қаралды 29,393

TechThoughts

TechThoughts

Күн бұрын

Пікірлер: 32
@kmontoya87
@kmontoya87 4 жыл бұрын
This series is just phenomenal - finding something like this on KZbin can be a hit or miss, let alone specific to this subject - I'm just so appreciative for - thank you so much. This is Udemy quality if not more.
@lahirupriyankara2183
@lahirupriyankara2183 2 жыл бұрын
best powershell course on youtube thank you!!!
@AndyRofe
@AndyRofe 5 жыл бұрын
As someone who has been exploring PowerShell indepth more recently, your videos have been super helpful and you explain concepts in such a good way. The real world practical examples are incredibly handy too. Thanks for the time and effort you have put into this video series!
@BijouBakson
@BijouBakson 3 жыл бұрын
I've searched for over a year for a proper tutorial on this. Especially for the course on your website. Thank you so much.
@Techthoughts2
@Techthoughts2 2 жыл бұрын
Glad it was helpful!
@mikepackman1516
@mikepackman1516 4 жыл бұрын
I agree with most on here, this is a quality series of videos. I've been in IT since the 90s (and used be a programmer until University put me off for life lolz), but I've never made the switch to Powershell (mainly as I'm a network guy), but since returning to the company I'm at now, I'm doing a lot more server stuff and they love core, so I've been picking it up piecemeal, I've had some time off this week so I thought I'd get into it (books are ok, but it's nice to sit back and watch on the tv). Not sure why I was so hesitant in the past, but thanks for the kickstarting my journey into doing more with Powershell.
@pallabba
@pallabba 4 жыл бұрын
best video on power shell logic on internet..Thank you for creating such an amazing content
@derekdwerlkotte1840
@derekdwerlkotte1840 3 жыл бұрын
Thank you for putting this series together! Can I make a request for another video / series of pulling a stored procedures from SQL server and different ways to go through data pulled from stored procedure's?
@justethom
@justethom 4 жыл бұрын
One of the best series on KZbin as of today! Thanks a lot :)
@OFabianoSilva
@OFabianoSilva 2 жыл бұрын
I can learn a lot from this series
@Greenerkev1
@Greenerkev1 Жыл бұрын
Love it! Learned a lot. Thanks😊
@LOOregano
@LOOregano 2 жыл бұрын
This is a very powerful video that really simplifies more complex things to newer people. Thank you!
@pashupatimishra9335
@pashupatimishra9335 4 жыл бұрын
Great playlist to learn powershell.
@tiagobial4
@tiagobial4 4 жыл бұрын
there are lots of videos about powershell on the internet however none of them explained so well as you did; people are concerned about the content and not about how the content is presented.
@s.baskaravishnu22
@s.baskaravishnu22 3 жыл бұрын
Many thanks
@dalefirmin5118
@dalefirmin5118 2 жыл бұрын
9:27 On the first pass of the loop, we got the number ZERO, not the number ONE. The corresponding color is black so it's hard to see.
@leetkhan
@leetkhan 5 жыл бұрын
Very well put.
@ShivaBhardwaj-no3yu
@ShivaBhardwaj-no3yu 9 ай бұрын
Hello, Thanks for the great Tutorial. I have two questions: 1Q. When I am typing $item.PSIsContainer, why IDE is not giving me suggestions for PSIsContainer? I just typed it manually as per video? 2Q. In this line "$largeProcesses = @()". That's how we create empty object in Powershell? Thanks!
@JasonJonesoriginal
@JasonJonesoriginal 4 жыл бұрын
On your rainbow "for" loop example. Why did you do -le 15 instead of -eq 15? The number 1 is less than 15 so shouldn't the loop have stopped immediately?
@Techthoughts2
@Techthoughts2 4 жыл бұрын
for ($i = 0; $i -le 15; $i++) { Write-Host $i -ForegroundColor $i } The second designation for $i here $i -le 15 is the criteria for the loop to continue. If you put $i -eq 15 the loop would not run at all. Because $i starts at equal to 0, and would not run because $i does not equal 15. We put $i -le 15 because we want the loop to continue to run as long as $i is below 15.
@tonyto8384
@tonyto8384 2 жыл бұрын
whats the point of adding [int] in front of the variables when youre setting them to a number already? is that like declaring the variable as a constant? like an integer always
@Techthoughts2
@Techthoughts2 2 жыл бұрын
Great question. PowerShell is a dynamically, implicit typed language. This means variable type can be dynamically inferred based on what you load into it. $x = 100 # this will be an int $x = 'str' #this will be a string ^ note here that $x gets CONVERTED from an int to a string. but sometimes PowerShell gets this wrong, and/or you just want to be explicit. So, PowerShell supports strongly typing a variable. [int]$x = 100 # this will be an integer no matter what and can now only be an integer. Now, you can't load a string into it, it will fail.
@tonyto8384
@tonyto8384 2 жыл бұрын
@@Techthoughts2 thank for the clear explanation! your PowerShell playlist has helped me so much :)
@Johannes00
@Johannes00 3 жыл бұрын
My first program after watching a bunch of your videos! It checks and counts odds & evens in a user supplied range. :) I prefix my user variables with x to easily clear them from memory later. Clear-Host $xOdd, $xEven = 0, 0 $xBottomRange = Read-Host -Prompt "Enter bottom range" $xTopRange = Read-Host -Prompt "Enter top range" [console]::Beep(1000, 200) Write-Host `n "-- Starting Evaluation --" Start-Sleep -Seconds 1 Write-Host `n "Value | Result" `n "--------------" $xBottomRange..$xTopRange | ForEach-Object { if ($_ % 2 -eq 0) { Write-Host ([string]$_).PadLeft(5, " ") " | even" $xEven += 1 } else { Write-Host ([string]$_).PadLeft(5, " ") " | odd" $xOdd += 1 } } Write-Host `n "There are $xOdd odd(s) and $xEven even(s) in the range of $xBottomRange - $xTopRange" [console]::Beep(500, 200) Write-Host `n "-- Process Complete --" `n Remove-Variable x* Start-Sleep -Seconds 1
@ConSys2023
@ConSys2023 3 жыл бұрын
Update-Help: Failed to update Help for the module(s) 'Dism, Get-NetView, Kds, NetQos, PcsvDevice, PKI, PSReadline, Whea, WindowsUpdate' with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).). English-US help content is available and can be installed using: Update-Help -UICulture en-US. Perhaps you can help solve this error in powershell...
@asjadullahsarosh9762
@asjadullahsarosh9762 2 жыл бұрын
Getting error with elseif - The 'term' is not recognised as the name of a cmdlet
@Warmachine-tu5zo
@Warmachine-tu5zo 4 жыл бұрын
Thanks for the videos they are great. I have one issue I cannot figure out for the life of me right now.. I copied your example completely and I am getting elseif: the term 'elseif' is not recognized as the name of a cmdlet, function, etc.. $pth = 'C:\users' $evalpth = Test-path $Pth if ($evalpth -eq $true) { Write-Host "$pth VERIFIED" } elseif ($evalpth -eq $false) { Write-Host "$evalpth NOT VERIFIED" }
@Techthoughts2
@Techthoughts2 4 жыл бұрын
When copying and pasting into a PowerShell terminal the bracket({}) placements matter. In the code above your brackets are on their own lines and this is not supported when pasting directly into the console window. Change it to: $pth = 'C:\users' $evalpth = Test-path $Pth if ($evalpth -eq $true) { Write-Host "$pth VERIFIED" } elseif ($evalpth -eq $false) { Write-Host "$evalpth NOT VERIFIED" } This is discussed in length here: github.com/PoshCode/PowerShellPracticeAndStyle/issues/81
@isaacmaag1294
@isaacmaag1294 2 жыл бұрын
Still a little confused on what value the i variable is?
@Techthoughts2
@Techthoughts2 2 жыл бұрын
In a foreach loop $i is often used as a placeholder to construct the loop. it represents the loop control. if you wanted to do something 15 times starting at 1, you would set the following: for ($i = 1; $i -le 15; $i++) { Write-Host "Times I've run: $i" } try it out!
@guai9632
@guai9632 5 жыл бұрын
prev vids was useful even for a skilled programmer who wants to grok ps quickly. but in this one you explaining how to program. too deep diving into basic stuff
@Techthoughts2
@Techthoughts2 5 жыл бұрын
The series aims to make viewers successful at using PowerShell. That includes experienced folks as well as brand new folks who have never programmed before. So, a few videos will cover some basic programming concepts. We'll have 1 more video like this - Video 7 - Input & Output - and then we'll start diving into some really fun stuff. I'd expect more experienced programmers to skip several videos when the series is complete. Stay tuned as more PowerShell goodness is on the way!
PowerShell Input & Output
20:53
TechThoughts
Рет қаралды 25 М.
Getting setup for PowerShell Development
18:42
TechThoughts
Рет қаралды 20 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Learn and use PowerShell with just three commands
16:08
TechThoughts
Рет қаралды 63 М.
Working with the PowerShell Pipeline
15:17
TechThoughts
Рет қаралды 92 М.
PowerShell Errors and Exceptions Handling
27:49
TechThoughts
Рет қаралды 30 М.
PowerShell Scripts
49:37
TechThoughts
Рет қаралды 84 М.
PowerShell Modules
25:01
TechThoughts
Рет қаралды 14 М.
PowerShell Remoting
37:12
TechThoughts
Рет қаралды 74 М.
PowerShell History and Current State
10:32
TechThoughts
Рет қаралды 11 М.
Working With PowerShell Variables
19:04
TechThoughts
Рет қаралды 40 М.
Manage Cloud with PowerShell
36:56
TechThoughts
Рет қаралды 10 М.
PowerShell Functions
36:06
TechThoughts
Рет қаралды 44 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН