r/PowerShell • • Mar 22 '17

Fuck PowerShell 2.0, fuck it so much

Isn't it clever! Isn't it just so much more clever than anyone else!

I've fucking had it with this piece of shit language. And I've read the manual and been using it every day for the last 6 weeks.

So you want to redirect output using the > operator? Yeah, fuck you, PowerShell will insert newlines at the console width even though you're outputting to a file. Surprise! Turns out you've got to run your command in cmd.exe and redirect the output from there if you don't want a smart-alec fucking up your output data.

How about .Net 3.5? No timeouts in any of the network classes! Because, that's right, fuck you. Oh sure, you can dick around with event handlers and time shit yourself, but damn it, so fucked up.

Oh, want to automate using the Internet Explorer COM object? Well, fuck you, the object gets corrupted if you try and navigate in the ISE. That's right, no debugging for you! Fuck off, like you should be able to debug.

Every. Fucking. Day. Comes. A. New. Surprise.

Because fuck you, courtesy of the utter vile ****s that work at Microsoft.

Well, fuck you, Microsoft. And fuck the stupid company that uses Microsoft anything in the workplace. I'm not coming back.

Update 2017-03-23 oh lookie here, another day, another fuck you from Microsoft. What could it be today? Well, guess what! Write-Debug outputs to stdout (1>) in PowerShell 2.0 when it outputs to 5> in later versions of PowerShell. Who'd have thought debugging would be piped to the stdout stream! Microsoft! Okay, okay, I'll recode all my scripts not to output debugging because it isn't separately redirect-able.

2 Upvotes

11 comments sorted by

8

u/KevMar Community Blogger Mar 22 '17

Now that you got that out of your system, what can we help you with? I want to tell you to update to PS 5.0 because the only thing that can't update is XP and Server 2003, but I'll assume you have your reasons or it is out of your control. At least update your admin machine if possible.

Redirection is poor and mostly there for legacy support. Pipe your output to Add-Content or Export-CSV instead. You will get much better results than the > or Out-File redirection for the reasons your mentioned.

If you don't already know not to use Write-Host, then let us know. The short answer is that it does not redirect.

Stay away from COM objects. They really should be a last resort. Doing anything with the GUI is second class with PowerShell. If you are doing basic web stuff, Invoke-WebRequest may exist in 2.0.

ISE isn't that good in 2.0. The debugging is really nice in the newer versions.

0

u/[deleted] Mar 22 '17

Yes, the company is using Server 2003. It's frustrating knowing that PowerShell 3.0 fixed a lot of things.

6

u/jheinikel Mar 22 '17

Your post is ridiculous on so many levels. I have an environment where PS2 is the only thing available on almost every workstation. Then, there is a mix between the server infrastructure. Never have I had such a bad day like you did. Then again, I didn't expect to conquer the world in 6 weeks with PS. I do this thing called "Setting reasonable expectations".

0

u/[deleted] Mar 23 '17

Never have I had such a bad day like you did

I wonder why... oh, here it is:

I didn't expect to conquer the world in 6 weeks with PS

Yes, lower-than-reasonable expectations will get you everywhere with Microsoft.

0

u/jheinikel Mar 23 '17

Because I am very proficient in PS, could you put in a good word for me when they fire you for incompetence or poor attitude?

-1

u/[deleted] Mar 23 '17

Because I am very proficient in PS

Oh God could you say anything more full of shit!?

Next you're going to tell me how much you love Visual Basic.

Fuck off, Microsoft shill. Yes, we all know you're one of hundreds of accounts at a public relations firm trying to "game" general opinion about Microsoft. But it's obvious.

  1. you're no programmer

  2. nobody says they are "proficient" in a piece-of-shit language like PowerShell unless they are deluded or completely inexperienced at programming in general

  3. you're just totally full of shit

3

u/SliverSrufer Mar 22 '17

My favorite is connecting to a corrupt WMI repository. You have to multi thread stuff and time it and kill it if the thread times out. Because if you don't it will just hang the whole script.

1

u/[deleted] May 17 '17

No idea what you are talking about, but it sounds awesome.

2

u/root-node Mar 22 '17

I like PowerShell v2. Yes v3 and above is much better, but when when you are working with 2003 and 2008 it's all you have and you just have to script around it.

My QA scripts are all written in PowerShell v2 and work perfectly well in Windows 2003.!

https://github.com/My-Random-Thoughts/Server-QA-Checks

1

u/humble_adm1n Mar 24 '17

Coming to a Powershell forum ranting about Powershell is one thing.

But ranting about a software using a version that's almost 8 years old and complaining that it's buggy is a whole other thing. Especially using it on an OS released 13/14 years ago that's out of support for almost 2 years.

Wouldn't it be more clever to blame your company for ​not letting you use an OS from this decade?

1

u/Ok_Insect_4852 May 08 '25

Fuck PowerShell and Fuck Microsoft.