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

How to discover commands?


Powershell pretty much has universal tab-complete. Typing a command, '-', and repeatedly hitting tab will cycle through all available arguments for that command, and arguments will be quite consistent between commands. But you can also tab complete variable names and the commands themselves.

Discovering the cmdlets is not as trivial as it could be, because they are named verb-first instead of noun first. Get-<tab> is not as useful as NetAdapter-<tab> might be, but since things are named sensibly you can do a little guess work and use tab-completion to find what you're looking for in the vast majority of cases.


> Discovering the cmdlets is not as trivial as it could be, because they are named verb-first instead of noun first

Irrelevant. Use

    Get-Command *network    #network anywhere in noun
    gcm *-network*          #network as first word in noun
PowerShell has it all, its just that people don't bother to learn it.


Which good documentation do you recommend?


Poweshell in depth, or in month of launches.

But, experience is more important. Simply do everything in posh, even if there is a handy gui. After a few months you are closer to pro then with any books.


should't the first one be "network as last word"?


Indeed. My bad.




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: