Got PowerShell Figured Out Yet?

Here’s the answer from our new best friend Gary.

His post covers:

  • -loops
  • -variables
  • -arrays
  • -math
  • -string concatenation
  • -output

In this post, he shows us how adding:

> .\filename.txt

to a command writes the output to a file in the current directory and also how adding:

 | format-list 

to a command converts our output from a nice table with headers and everything to a list with space to be more verbose. For example, try these two:

get-process winlogon

and this:

get-process winlogon | format-list

This is the most I’ve learned in the shortest amount of time in a long time. Especially if you count the fact that I now know there’s only four perfect numbers less than 200,000.




Comments are closed.