r/PowerShell • u/Defiant_Wafer5282 • Apr 04 '26
Powershell Noob
Hey all
I’m a slight newbie and landed a JR infrastructure engineer role that includes looking after cloud environments, patching software and machines.
Is there any advice where I could get into learning more powershell scripting or and decent YouTube courses I could follow
Any help is appreciated
20
Upvotes
View all comments
Show parent comment
1
u/TofuBug40 Apr 06 '26
There is another option that blows all of these previous methods away. Filter BEFORE you get your data instead of after like we are doing now. Then you get something like
That's almost twice as fast as all our previous attempts. What did we do? dropped the where and handed
Get-ChildItem -Filter '*.txt'instead.Most EVERY system designed to be queried for data be it file systems, active directory, SQL, etc have mechanisms built in to accept a filter from you where it takes that onto its own server where it has all the processors memory disk space etc to FLY through filtering the data and as a bonus has LESS DATA to send back to you. So everyone wins your script gets faster the load on the endpoint is lower.