Once you’ve been using PowerShell for a while you start to notice that you can often get the job done using just one line of code. These “one liners” can sometimes look pretty impressive, but they are also get pretty cryptic!
Its a good sales pitch for PowerShell: “yeah, I can do [insert amazing feat here]. It just takes a line of code in PowerShell!” ;)
I like to think of these, as small bragging rights for the new language, and I call them Power Lines. As I find interesting Power Lines during my wanderings I will start posting them here.
Of course the most impressive Power Lines I’ve seen around originate from developers, so I make no promises on the “amazement” factor ;)
Starting off small here’s the first one that I’ve been using today:
This simply generates a new GUID in string format.
What’s your Power Line?