r/PowerShell • u/iamelloyello • Nov 17 '22
Question ELI5 "$_"
Attempting my way through "PS through a month of lunches" only experience being my A+.
They are just glossing over "$_"
Here is an example from the book.
Can someone break this down for me? They attempt to in the book but don't go in depth enough, so I would have no idea how to use this in a real scenario:
Get-Process | Format-Table Name, @{name='VM(MB)';expression={$_.VM / 1MB
➥ -as [int]}}I just feel like this book goes leaps and bounds over what you just learned about. I just went from learning how to formatting a list to whatever... that is. Again, they *attempt* to explain what is going on here, but I have no idea what "{" are used for, why you would use them, when you would use them, etc.
132
Upvotes
9
u/Mysterious-Ad-1541 Nov 17 '22
Do you have any trainings I can use to test this? I have read this over and over and do not understand.