The PowerShell-Haters Handbook

(telcontar.net)

12 points | by Mr_Minderbinder a day ago ago

5 comments

  • perarneng 14 hours ago ago

    I was forced to use Windows Server for an assignment and I like to learn new languages and PowerShell seemed interesting even though it's really ugly. It's much nicer to work with than Bash since everything is an object instead of having to do complex string magic. I can really recommend people trying it at least. Nushell is similar and probably what you would go for on linux, just played with it a bit and I liked it as well.

    • steve1977 13 hours ago ago

      Not only that, it's also typed.

      So if you iterate over files for example, you can get the modification date as an actual DateTime property and not some string that might contain a date in some locale that you potentially have to parse then.

      • SoleilAbsolu 10 hours ago ago

        Also - regarding linked article's statement "PowerShell joins MSI files as another type that cannot be run as an administrator" - I have always just started a PowerShell/Terminal app as administrator which has more or less the same effect, though of course everything in that session is run with elevated permissions.

  • gabrielsroka 14 hours ago ago

    2020

    > PowerShell scripts require all subroutines to be defined before they can be called

    True but so do Python and other languages. My solution is to put main at the top and then the very last line of the file calls main.

    > "New" as a verb

    Look in your File menu.

    > PowerShell ISE

    Was put in maintenance mode in 2017, 3 years before this article was written. Granted it still comes bundled in Windows. It actually has some great features, but also many quirks. New work is done in Visual Studio Code.

    Many of the rants could be made against other languages. I admit PowerShell is not perfect, but there are some really cool things about it.

    Bjarne Stroustrup, the creator of C++, is famous for the quote: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".

  • 7bit 11 hours ago ago

    PowerShell is really great to work with as a shell, compared to bash, where everything is just string you have to awkwardly parse with commands that nobody ever remembers.

    Love PowerShell!