Working With PowerShell Variables

  Рет қаралды 39,977

TechThoughts

TechThoughts

Күн бұрын

Пікірлер: 31
@BeccaTheBoring
@BeccaTheBoring 2 жыл бұрын
Thanks! I started watching to refresh my 15 year old training. Wasn’t expecting to find a new editor I actually like! ISE really wasn’t cutting it and I absolutely hate PyCharm! Thank you!
@sanghvian
@sanghvian 4 жыл бұрын
This series is literally the best thing I've binged. Thanks so so SO much for such amazing videos and powerful documentation !!
@خالدعبدالله-ج7غ5ي
@خالدعبدالله-ج7غ5ي 10 ай бұрын
Thank you that was awesome...
@amritarongpipi2617
@amritarongpipi2617 3 жыл бұрын
This tutorial is best ever with the combinations of video and blog.
@kd_john8200
@kd_john8200 4 жыл бұрын
This is one of the best explanation of PowerShell variables videos I have ever seen. Keep up the good work!
@Chris-tu8qd
@Chris-tu8qd 4 жыл бұрын
These videos are fantastic! Great job. You're a very skilled instructor.
@DrWho2008t101
@DrWho2008t101 4 жыл бұрын
thanks for the video.
@sawyerclendening8430
@sawyerclendening8430 4 жыл бұрын
Awesome videos! I am trying to learn PowerShell to further my new IT career but I have 0 coding experience, so I do get little lost in the terminology of things like whats a string and how can I tell it apart in. But that's nothing little google can't help me with!
@ashisharya65
@ashisharya65 Жыл бұрын
What's the VS code extension you are using ?
@isaacmaag1294
@isaacmaag1294 2 жыл бұрын
A little confused with the beginning... Around 3:34 you said that It was so much more conveinent to use $processes when that is just as long as get-process... You still had to run two commands and type out the pipe plus the commands and so each example the time didn't change? Your first two commands were the same amount of time as the second two? Seems a little confusing.
@Techthoughts2
@Techthoughts2 2 жыл бұрын
Its more convenient when your doing a lot of stuff with the data capture. When you run a command like the following: Get-Process ^ This is just a moment in time and you get the raw object return. If you want to sort the data a different way, you have to run Get-Process again if you only wanted info on one particular process, you have to run Get-Process again if you just wanted memory information, you have to run Get-Process again This is very expensive (Get-Process has to be run EACH TIME). Alternatively, you can run Get-Process once and then work with the data as much as you want: $processes = Get-Process $processes | Where-object {$_.Name -eq "notepad.exe"} $processes | Where-object {$_.CPU -gt 1000} $processes | Sort-Object WorkingSet64 -Descending $processes | Sort-Object -Descending CPU
@BijouBakson
@BijouBakson 2 жыл бұрын
Thank you.
@aloisodipo8459
@aloisodipo8459 2 жыл бұрын
The topics are good so far,but need to increase the fonts of the video for more visibility when using a phone.
@budcarr8673
@budcarr8673 Жыл бұрын
Gr8 video !
@pseudounknow5559
@pseudounknow5559 3 жыл бұрын
Thats a very good video
@muhammadsajid2676
@muhammadsajid2676 4 жыл бұрын
Thanks for the video. :-)
@Techthoughts2
@Techthoughts2 3 жыл бұрын
Welcome!
@TotalWarriorLegends
@TotalWarriorLegends 4 жыл бұрын
Are you also make an video how to begin with scripting and what are the basics and what is importent?
@Techthoughts2
@Techthoughts2 4 жыл бұрын
Yes. This series has many episodes, and one is dedicated to scripting. Check out the whole playlist: kzbin.info/aero/PL2j0_s2VJe2hzQuQyn6yfMS2olhhs4UnQ
@chris8534
@chris8534 3 жыл бұрын
Hmmm.....if you put get-process into the variable so it only had to be loaded into memory once - true that is more efficient but won't that data in that variable go more and more out of date over time as the data is a snapshot of that command?
@mbahr6322
@mbahr6322 2 жыл бұрын
Hi, can you please tell me the answer for the below question Which variable cannot be modified by the administrator? A)user created B)automatic C) preference D)pre-defined
@betenu1
@betenu1 5 жыл бұрын
Wouldn't be easier to pipe all the commands into one variable? I'm referring to the filedata example
@Johannes00
@Johannes00 3 жыл бұрын
$foo = 1..5 $foo 1, 2, 3, 4, 5 $bar = $foo -ge 2 $bar 2, 3, 4, 5 $bar = $bar -le 4 $bar 2, 3, 4 I'm very new to powershell and I don't know how to improve this with the pipeline but I'd like to use compound comparisons / conditionals? Tried doing $bar = ($foo -ge 2) -and ($foo -le 4), but this obviously returned a boolean which is not what I want. Goal is to check a list of ordered numbers and clamp the output, in this case, only greater than 1 and less than 5.
@Techthoughts2
@Techthoughts2 3 жыл бұрын
Let me know if this makes sense. There are many, many ways to do this. $foo = 1..5 $bar = @() $foo | ForEach-Object { if ($_ -gt 1 -and $_ -lt 5) { $bar += $_ } }
@Johannes00
@Johannes00 3 жыл бұрын
@@Techthoughts2 That's a Here-String function, I think? You're piping $foo into the ForEach-Object, and the $_ is an automatic variable? So, ForEach variable passed into this, check if it's gt 1 AND lt 5, and if it is add it to $bar? Learnt a lot from that example, thanks! -Edit, I found out @() is an empty array, whoops! Makes more sense to me. I don't quite understand the difference between lists and arrays yet, especially when it comes to using the pipeline. If I want to learn more ways of doing this, what else should I look up?
@DElionel1995
@DElionel1995 4 жыл бұрын
Where do you explain arrey's?
@Techthoughts2
@Techthoughts2 4 жыл бұрын
Hi Lionel, I haven't gone in depth with Arrays in the series yet. In the meantime here is a great post that covers everything you would want to know: powershellexplained.com/2018-10-15-Powershell-arrays-Everything-you-wanted-to-know/
@dalefirmin5118
@dalefirmin5118 2 жыл бұрын
It should be repeated that, unlike other programming languages, cmdlets and variables are NOT case sensitive. So $rawfiledata and $rawFileData are the same. And although other special characters can be used, "best practices" is to only use the underscore.
@marialainapreciado5677
@marialainapreciado5677 3 жыл бұрын
Honestly this video lost me at the very beginning. What is Get-Process? Why are you using it? Do you have to type Get-Process before using a variable?
@TheM0n
@TheM0n Жыл бұрын
Taking Control with PowerShell Logic
27:57
TechThoughts
Рет қаралды 29 М.
Working with the PowerShell Pipeline
15:17
TechThoughts
Рет қаралды 91 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 18 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 29 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 12 МЛН
Windows PowerShell [04] Variables, Types & PSDrives
19:36
John Hammond
Рет қаралды 40 М.
PowerShell Input & Output
20:53
TechThoughts
Рет қаралды 25 М.
PowerShell Variables Explained
14:38
Shane Young
Рет қаралды 31 М.
PowerShell Modules
25:01
TechThoughts
Рет қаралды 13 М.
Learn and use PowerShell with just three commands
16:08
TechThoughts
Рет қаралды 61 М.
Starting out with Powershell in the multiverse! Multi Dimensional Arrays
28:35
PowerShell Errors and Exceptions Handling
27:49
TechThoughts
Рет қаралды 30 М.
Getting setup for PowerShell Development
18:42
TechThoughts
Рет қаралды 19 М.
5 Tips to Help You Learn Windows PowerShell
18:34
Gary Explains
Рет қаралды 45 М.
PowerShell Quick Tips : Test-Path
16:22
JackedProgrammer
Рет қаралды 1,5 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 18 МЛН