

PowerShell: Windows Scripting Made Fun Again - Mojah
http://mattiasgeniar.be/2009/02/27/powershell-windows-scripting-made-fun-again/

======
makecheck
It may be a powerful shell, but I wish the examples were a bit more practical
and enticing.

First of all, what's missing on Windows is a useful _interactive_ mode for the
command prompt. Do they really expect people to type these kinds of lines at
the prompt? If I wanted a verbose, object-oriented _interactive_ interpreter,
I could use Python right now, on Linux or Windows or Mac. What I really want
is for Microsoft to ship something in the box with Windows that is as useful
as having bash or tcsh with a collection of Unix utilities.

The article's 5+ lines of Windows PowerShell could be replaced with the Unix
command "date '+%m-%d-%Y %H:%M:%S'" to get roughly the same result. If you
want to add 10 days (as in the article), "date -v+10d '+%m-%d-%Y %H:%M:%S'".
If Microsoft wants to win over practical shell users, they'll have to come
much closer to something like this.

~~~
olavk
You can do it in one line, if that is what you mean?

    
    
        (Get-date).AddDays(10).ToString()

