I've been trying to use PowerShell to quickly search through Windows files and settings (faster than GUI), but have encountered some difficulties in improving search speed and I couldn't find solutions for them on the web.
First, I'd like to make a cmdlet which displays my own text on demand (I want to put there frequently used commands defined by me because 'get-command' is way too big for a quick search, but I don't know how do it. I made a simple script with the 'echo' cmdlet, but it's displayed only once.
Secondly, how to merge together Set-Location, Get-ChildItem and Sort-Object to quickly change directory and automatically display the list of directory content, sorted by name? It could be a custom cmdlet.
Thirdly, how to merge together Set-Location with Push-Location to easily type 'popd' to return to the previous directory?
I think your language is a bit confused here. Actual Cmdlets are written in .Net.
However, I don't think that's what you want. The tasks you describe could be accomplished with script files and functions, which are about an order of magnitude less complicated to develop.
First I'd like to make own cmdlet which displays my own text on demand (I want to put there frequently used commends defined by me, cuz 'get-command' is way to big for quick search, but don't know how do it. I made simply script with 'echo' cmdlet, but it's shown only once.
This sounds like a script. See Get-Help about_Scripts.
Secondly how to merge together Set-Location, Get-ChildItem and Sort-Object to quickly change directory and automatically display sorted by name list of dir content? It could be custom cmdlet or so.
You can create a script with parameters to accomplish this pretty easily (well, easily when you're familiar with it).
Thirdly how to merge together Set-Location with Push-Location to easily type 'popd' to return to previous dir?
Was this an example? Pop-Location
already exists, and it already has an alias of popd
.
If you want to look at MS documentation, I would start with Get-Help about_Scripts. It also might be worthwhile to complete the Getting Started with PowerShell 3.0 Jump Start class at Microsoft Virtual Academy, which is one of the few tutorials of any kind I've heard nothing but good things about. The stuff you're talking about begins in part 9, but honestly, you sound new enough that you would probably benefit from the entire class.
There is some Microsoft doc that would qualify as a howto, but it's pretty hit-and-miss, honestly. The biggest problem with PowerShell's documentation overall is that it's a good technical reference, a mediocre cookbook, a bad user manual, and doesn't even pretend to be a tutorial. It's meant for people who already know how to script to use.
I'm not aware of any other good online tutorials, but you might want to check elsewhere like the /r/PowerShell subreddit.