Powershell still sucks

Powershell is a great command line shell, if you all you know is cmd and batch. There are so many things it is missing when trying to compete with current Unix shells such as Bash, and while some of them have semi-working workarounds, many are sorely missing.

My pet peeves are:

  • A decent pager. “more” is basically at the same stage it was when I started working in MS-DOS 3.30, and it is nowhere near the functionality of “less”(1).
  • Persistent history. I’ve seen some workarounds but couldn’t get any of them to work properly.

Both of these features have been available to me since I started working with Linux in 1995, and it is really difficult living without them in MS-world. A decent terminal emulator will be nice too – the Powershell box has advantage over the cmd.exe box in that it is blue – other then that they are both in the same sorry state that the “dos box” of Windows 3 fame was at. I’m using “Console 2″ to get some useful work done, but it too leaves much to be desired.

Also, startup is so.. fscking.. slow.. Starting Powershell on a brand new machine (with no per-session user scripts) can take as much as 3 seconds. Those are minutes of my life everyday that I would never get back.

  1. and I’m not talking about the built-in editor, just being able to “page up” would have been nice []

6 Responses to “Powershell still sucks”

  1. John:

    You are right. Powershell sucks. It isn’t as powerful as a full compiled language and is not quick to use like vbscript or command-line scripting. So it falls in between and doesn’t really have a nitch other than MS wants it to be the scripting language of choice for Windows (for now). MS is forcing this pile of non-intuitive garbage on it’s customers as a “service”.

    • Oded:

      I am coming to this from the perspective of a UN*X user, which I think is the target audience for this product – Microsoft wants to entice administrators who are used to the UN*X way: powerful shell languages allowing you to do anything from the console – remote access, administer, script and even build complete applications using a simple language that is fast to work with.

      Powershell looks more like bash/ksh/csh than any other Microsoft technology (excuse me, but CMD batch processing is a horrible pile of junk that hasn’t gained a single feature since MS-DOS 7.0 days, and VBScript as a system administration language is a sad joke), but when I use it I am mostly reminded in how much MS-Windows is not UN*X – Powershell is not simple, it is not fast, and it is not comfortable.

      It does offer remote shell -like access (using WinRM with WMF 3.0), which while could be easier to set up and still suffers from all the problems of Powershell itself, is still so much better than needing to open a full screen RDP session every time you want to manage a remote machine.

  2. KPB:

    I have to agree that powershell sucks. I’ve been in the IT industry for over 35 years. It’s laughable that people thing Cobol was horrible. I’d take Cobol over powershell any day!

  3. Berferd:

    It is pretty bad when the end user cannot double click and run the script.

  4. Jon Retting:

    Powershell is ballz. For example try using to just return/store you active NIC’s ipv4 address. Just the IP, nothing more, nothing less. You either end up with a cluster fuck of powershell code with well over 20 lines. Or you resorted to bringing in Vbscript and CMD code. Just strpin the brackets from “{}” is a ridiculous task. Microsoft decided it smart to have 90% of their shitlets useless, while deeming “Get-PrimaryNic -IPv4″ not worthy.

    Powershell’s stupidity is mind-numbing. You might as well complete the task with the GUI like clicking on 20+ Remote machines, open a remote computer management windows. Then for each system update the drivers for a device. Then you find out for some shit reason, hidden in layers of chaotic unsearchable nonsense, microsoft has chosen to remove remote device management. So they release cmdshitlets to manage/replace it. This means you will now spend twice the amount of time tooling around with the new shitlets, and finally conjure up a useful set of tools for applying them. Then powershit happens and you just don’t give a crap.

    If you like writing needless pointless code all day, in order to accomplish the most basic of Tasks Powershit is for you. If you enjoy network news, write batch/cmd scripts, think vbscript is good stuff, and prefer using a laptop to work on, and prefer web-browser tabs on above the address bar, Powershit is totally for you!

    Meanwhile people who actually do cool stuff use a Bourne based glue, and bash it like its hot.

    • Oded:

      Totally Agree.

      Other things I managed to get annoyed about with PowerShell, since this article was written:

      • TAB completion cycles through options instead of showing a list – meaning you can never be sure of what options are available other then the first, and if you happen to hit any key after the TAB, you have to backspace and try again (granted, this is not new for PS, it was bad like that in cmd.exe).
      • The “Verb-Object” syntax makes it really hard to find what you want with TAB completion. .e.g I want a list of services: Get[tab], and you have to cycle through all the things you can get until you get to Get-Service at “S”. UN*X is more intuitive with “object verb” syntax: service[tab] -> list of services -> [tab] -> operations on each service.
      • Default “execution policy” doesn’t actually allow you to use PS scripts. If you create helper scripts (because the command line syntax is horrible mess) and run them from the console, then you either have to change the default policy on all the systems you manage, or use contrived “bypass” mode.
      • As Berferd mentioned – forget about double clicking a script – it cannot be made to work.
      • Logic operations use weird perl-like syntax (-eq instead of ==) which is hard to remember.
      • Automatic conversion of single item lists into a single value, but not vice versa – ruins more carefully thought out scripts than any other programming mistake.
      • Automatic parsing of command line arguments for scripts is complex, unnecessarily verbose, inflexible and cannot be turned off!

Leave a Reply