Problem
I'm trying to find a way to find a string in a object list, like the result of Get-Alias. My problem is that all solutions are either way too long to be practical to use or do not result in the behavior I need.
What I've tried so far:
Using alias | sls -All "Get-". No result, because sls uses toString which is only the name column:
- Using
alias | Out-String | sls -All "Get-". Only highlights
- Using
alias | Where-Object {$_.Definition -like "*Get-Alias*"}. A lot to write and requires knowing the column where the text is.
- Using
alias | findstr "Get-". Works, but requires the use of a legacy executable that is not available on all PowerShell Core supported platforms. I want the code to work on all platforms without switches.
- Write to a file and then pipe that to
Select-String. Very inpractical.
...
Can someone help me with this problem?




alias | oss | sls -All "Get-"