Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PowerShell: Windows Scripting Made Fun Again (mattiasgeniar.be)
4 points by Mojah on Feb 27, 2009 | hide | past | favorite | 2 comments


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.


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

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: