Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I usually grep (powershell Get-ChildItem | Select-String) if I'm trying to do anything crazy in searching files.


Then there's also Powershell (as much as it improves on cmd) reminding me of adventure games where I have to remember which of the five synonymous verbs is recognized and does the thing I want.


You don't have to remember anything in powershell as you get parameter completion and command completion by default. Powershell useability beats the standard UNIX shells (bash/zsh) in command discovery and assistance. You even use PSReadLine if you want VI keybindings at the command line.


Am I using it wrong? I realize a large majority of those aren't used frequently, but there are ~250 cmdlets, each of which attempts to have a unique-but-also-generic name.

https://technet.microsoft.com/en-us/library/ff714569.aspx

Let's say I didn't know ForEach-Object existed (trivial example, but generalizes), how do I find out there is a cmdlet that does what I'm looking for?


`Get-Command` lists all the cmdlets in the current sesion. You can also alternatively hit `help -category cmdlet` which lists all cmdlets with their short alias and long name. You can do `man -category cmdlet` if you wish to page through. The first thing in powershell you should do is `help help` :).




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: