3 ms·
One of the best bits of PS1 advice I've seen was to get used to the Verb-Noun naming pattern [1] and in particular, the discoverability of the very standardized
by WorldMaker 10y ago
One of the best bits of PS1 advice I've seen was to get used to the Verb-Noun naming pattern [1] and in particular, the discoverability of the very standardized set of verbs [2].
Once you can guess the verb you want, then it can often be a simple matter of finding the right noun, and often nouns will be useful in sets similar to verbs.
Get-Verb, Get-Command, and Get-Help are all quite useful for looking for a command.
For dealing with the object pipeline I tend to find ConvertTo-Json very handy because as a developer I'm already quite used to reading objects in JSON already. (ConvertFrom-Json can similarly be used to bootstrap a PS1 pipeline with test data or remote data.)
[1] https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/14/discover-the-easy-way-to-begin-learning-windows-powershell/ https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/...
[2] https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).a...