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
You're one the right track in avoiding aliases moving forward.
Just bear in mind the do serve very real purposes.
Get-ChildItemactually has multiple aliasesdir,ls,gci. This way you can slip a unix/linux/etc user into a terminal or a DOS user and they can use all the same commands they already know. That theoretically gets them comfy without it being a major shock to the system. That said once you are over that transition you really should avoid using Cmdlet Aliases like the plagueThis is a bit more nuanced and the few places where I think aliases actually have a useful place and that's in parameter attributes. There are quite a few places where this makes sense
-Computer, some systems might call it-System, or-Devicehaving the alias on the parameter means all the magic in the pipeline can check properties and if it sees system or device it happily pulls it in just like it would with computer.-ilike,-like,-clikebut-likelike all the other normal binary operators is ALREADY case insensitive. So instead of having to define another 20+ full blown binary parameters theiversion of that operator is just defined as an alias on the normal one. That way if someone WANTS to be explicit and say$People | Where-Object -Property Name -IEQ -Value 'Joe'they can