Remember last command output eg PSLastItem - forgot to assign object to variable
When you type in and run a cmdlet (especially one with side-effects) and forget to assign the output to a varialbe, it would be nice to be able to pick up the last output still stored in object form, from an automatic PS variable (eg PSLastItem) to feed into another command.
Example: running Start-Process with -PassThru, then wanting the ExitCode of the result which I forgot to assign. Maybe even re-use $_ as shorthand, because we're not in the pipeline?
We don’t currently have any plans here, but I highly encourage you to check out the popular HistoryPx module: https://github.com/KirkMunro/HistoryPx
In the meantime, we’ll leave this open to allow move votes to drive the prioritization.
I hear you. We just have to be very thoughtful about what we bring into the rest of PowerShell based on the amount that users will leverage it. Part of the reason that we did PowerShellGet is to allow you to bring in everything that you want, no matter how large or small. :)
Thank you, just had a look, that's a great module - already thought of everything - except that it needs to be pre-installed and pre-loaded. And (although I will use that module in my own profile) I was hoping that something could operate without any thoughtful preparation - eg when we are supporting other 'clean' machines with default Powershell configuration.