r/sysadmin • • 1d ago • Regret 1

PowerCLI multiple default server mode just cost me my job

I work (well, worked) at an MSP. One of our bigger clients has a prod vCenter at their main site and a separate vCenter at their DR site. Twice a year we restore their critical VMs from backup into the DR cluster on an isolated network. Their app owners log in and sign off, then we tear it all down. We restore with the original names because a couple of their apps freak out if the hostname changes, and since it's all in a bubble it's never been an issue.
Tuesday was teardown. 31 VMs, and the DR datastore was sitting at like 92%, so I wanted them actually gone from disk, not just pulled from inventory. I had the name list from the restore job, so I ran the same little script I've used after the last three tests:
$vms = Get-VM -Name (Get-Content .\drtest.txt)
$vms | Where-Object PowerState -eq 'PoweredOn' | Stop-VM -Confirm:$false
$vms | Remove-VM -DeletePermanently -Confirm:$false
Yes Stop-VM, not Stop-VMGuest. They're throwaway DR copies, I didn't care about clean shutdowns.
What I forgot is that earlier that morning I'd connected to the prod vCenter in the same PowerShell window to look at a snapshot for a different ticket, and I never disconnected. And at some point years ago I'd said yes to that PowerCLI prompt about working with multiple default servers. So Get-VM without -Server pulls from every vCenter you're connected to.
Same names on both sides. So $vms had 62 objects in it instead of 31, and I never looked.
The power-off step went through all of them. I didn't notice, because a bunch of the DR copies were still running and a wall of power-off output is exactly what I expected to see. Then the deletes started. I'm half watching, and it's still going after it should've been done. About the same time Teams starts going off. I hit ctrl+c, and by then 6 of the prod VMs were deleted from disk: a SQL server, two app servers, an RDS host, their file server, and a print server (the only one nobody missed). The other 25 prod VMs had just been hard powered off in the middle of the workday.
I called my manager right then and told him exactly what I did. There wasn't any point doing anything else, my username is on every event in vCenter.
Most of the 25 came back fine once we turned them on, though one of the other SQL boxes needed some babysitting. Backups were good, thank god. Instant recovery had the 6 deleted VMs running off the backup repo within about an hour, but the repo is a box of spinning disks and SQL running off it was painful. Migrating everything back to real storage wrapped up around midnight. The last backup was 10pm the night before, so the file server lost most of a day of work. SQL had log backups, so it only lost a few minutes.
The client's IT director called our owner Wednesday and said he didn't want me in their environment again. They're about a quarter of our revenue and I was basically the guy on that account. Friday I got the "this isn't working out" call. Honestly can't even be that mad, it was completely avoidable.

762 Upvotes

315 comments sorted by

12

u/Apartheid20 1d ago

If you use PowerCLI , check $global:DefaultVIServers. Might surprise you….

3

u/MFZozzy 1d ago

Or just use Set-PowerCLIConfiguration the first time you install the module to set the default behaviours.

8

u/GloveLove21 1d ago

Also, wouldn't there be a -WhatIf argument that could and should be used in OPs situation?

→ More replies (1)

189

u/AfterCockroach7804 1d ago

Welcome to IT. Now you have a good “the time i fucked up….” Story :) however, your MSP should have had checks in place and approvals. Their loss honestly. Keep going and keep learning.

48

u/_stinkys IT Manager with many hats 1d ago

Everyone trips on the power cord occasionally. The problem is if you don’t learn from your mistakes.

16

u/AfterCockroach7804 1d ago

Exactly! I’ve taken down an entire credit union by flipping a switch on something still in the rack my first gig. In my defense i was following cables and saw “oh, that’s why its not working. It is powered off. Lemme switch it on” ….. and all the lights were a steady green :)

807

u/UCFknight2016 Windows Admin 1d ago • Bravo

It was a mistake... they shouldn't have fired you

164

u/LorektheBear 1d ago

And they just paid a bunch of money to train you too.

Your next employer will benefit.

273

u/mh699 1d ago

I'm always shocked at how quickly on here people get fired. Either there's more to the story or I've just been fortunate with where I've worked. I worked at a prop trading firm where someone once screwed something up and caused us to stop trading for a bit in the middle of the day, and we just had a blameless retrospective. Is this a small/medium sized business thing where employers are this harsh?

107

u/netvor0 1d ago • Bravo

Small companies that deal with smaller issues tend to be more explosive and take things real personally. They rarely have good leadership or a good idea of how to operate.

20

u/wallst07 1d ago

True, but they're also not hiring the best people on the market. I'm not saying they're all bad, but they are not getting the best mostly because they can't afford it.

•

u/SuperiorToastedBagel 20h ago

Had a small bridge testing company get hit by malware and they had declined backups, because backups are a rip off.

Owner was furious when told his company might just have gone under because of said malware. His concern wasn't that he fucked up by not having backups, it was wanting to know WHO opened the email. Having been around the block a couple times, I texted the PFY to pack up and get in the car RIGHT NOW. Because dude was about half a sec from throwing hands.

I ended up getting most of his data back but it was damn close thing. Still told boss we should have fired him. And no we did zero forensics to find the employee that downloaded the malware. Told our owner I wasn't going to get some employee fired or assaulted because their owner fucked up.

15

u/cmhamm Jack of All Trades 1d ago

I disagree. I’ve worked in small and large companies. Anecdotally, it was the small companies that tended to value employees, despite occasional mistakes. Of course, I’m not talking about someone who screws up everything they touch, but even the best employees make mistakes occasionally. If your company develops a reputation for firing anyone who makes mistakes, then you start having to deal with people always trying to CYA, and that makes solving problems so much more difficult.

→ More replies (2)

34

u/penmoid CCFHE: Crisco Certified Food Handling Engineer 1d ago

Not saying this is what’s happening here but I also feel like some of these unreasonable firings maybe don’t have more to the specific story but it’s more of a cumulative thing where the person has made a lot of mistakes and the one we read about is just the final straw.

I will say, though, that OP’s phrasing of “PowerCLI’s default settings got me fired” raised my eyebrow a bit. If this had happened to me, my messaging would 100% be that I made a mistake by not verifying the machines I was connecting to and going straight to a full delete instead of waiting.

Owning your mistakes definitely gets you more good will.

112

u/Sucralan 1d ago edited 1d ago

I'm curious what kind of people they are going to hire to replace this guy, which never came in touch with this specific environment and have probably no experience with failures like these. I mean do they really think the new guy is 100% failure free?

40

u/Im_really_bored_rn 1d ago

It's pretty obvious from reading OP's post that they got fired because the client that makes up a quarter of the company's revenue wanted them gone

32

u/shemp33 IT Manager 1d ago

That should be opaque to the client. The MSP has to be able to hire/asssign/reassign based on skills, needs, etc., not based on their name. The MSP should have insulated OP and given an SLA credit and a nice apology. Not a "sure, here's his head on a stake." That's probably a bigger sign that the MSP was a shitty place to work.

12

u/Bradddtheimpaler 1d ago

If they have to have someone else work this account, which it seems like from the post, OP was mostly handling, doesn’t that kind of free up work to do elsewhere in the org?

Tbh they may have softened the news initially to OP, but I wonder if the initial conversation wasn’t the customer explicitly saying that whoever was responsible for that needs to be fired or they’d look elsewhere for MSP.

31

u/Speeddymon Sr. DevSecOps Engineer 1d ago

I've worked in companies where I knew someone who could no longer work on xyz environment and the client said they wanted employee fired or they were leaving.

This is all puffery. The company did not, in fact, fire said employee, and the client did not, in fact, leave.

The company moved the employee to another department/client and that was the end of it. Client has no insight into how their service providers day to day operations look beyond their own environment so it's pretty easy to just say "yes we will do that" to retain the business, and then not do so but keep the employee out of their environment. Especially if the employee is usually a good employee.

78

u/WantDebianThanks 1d ago • Regret

Every new hire is failure free until they fail the first time, then they're fired right away, no second chances

60

u/Sucralan 1d ago • Bravo

fire > hire > train > work > mistake > fire > hire > train > work > mistake > fire - what an highly efficient environment

→ More replies (2)

37

u/dphoenix1 1d ago

When I worked at an MSP, literally nobody got fired for fuckups like that unless it was a repeated pattern of behavior (and you had to repeat your stupidity a LOT to cross that threshold). I think I only saw one person actually get fired for constantly screwing up in 11 years there.

Layoffs though? Oh yeah, that happened all the time, and eventually got me too. Gotta love private investment run companies.

→ More replies (2)

10

u/rootofallworlds 1d ago

I feel like in this case the “more to the story” is that OP’s employer fired them to placate the client.

8

u/SearchAtlantis Staff Engineer 1d ago

This is why I always run blameless post-mortems. Someone on a team I was leading DOS'd the production cluster. This was at a fortune 5 company.

Nobody got fired. That's how it should be done.

10

u/UCFknight2016 Windows Admin 1d ago

I worked at a shitty place and thankfully didnt get fired after I screwed up. I think the fact I was hired 3 weeks earlier was part of that reason lol

10

u/ProgressBartender Sr. Sysadmin 1d ago

Everyone makes mistakes, to expect an employee to never make a mistake is shortsighted.

→ More replies (6)

5

u/giantpandasonfire 1d ago

I’ve worked at MSPs that would absolutely fire you immediately for messing up like this if the contract was large enough. Hell I’ve seen people fired for not closing tickets properly.

10

u/BlackV I have opnions 1d ago

I'm always shocked at how quickly on here people get fired.

I feel like "America" is the very common description in those cases , it surprises me too

→ More replies (6)

53

u/caffeine-junkie cappuccino for my bunghole 1d ago

There were at least two mistakes I can see, neither of them really should be fireable offenses as long as it's the first time.

One is the not double checking the environment. The other is a process failure in the teardown of the DR environment. The process should be more than one person involved in the DR test on the technical side. Would say at least two people, one to do the shutdown and the other the delete. If it has to be only one person for some reason, separate out the scripts or at least put in an attribute check that only exists on one environment.

Forgot to add, this process failure is entirely on management not enforcing it was already in place before this event. Now they may be learning as well, which is fine. But to make OP a scapegoat for their failure is not acceptable for that. Sure can see pulling them from the client if the client doesn't want them, but that means just switching them out for someone and let them work with that client instead.

45

u/1a2b3c4d_1a2b3c4d 1d ago

I will also add that after 30 years in IT, I refuse to just delete anything quickly. I will find a way to quarantine or isolate what I need to delete, and only after a defined period of time will I, or someone else, double-check that the objects are no longer needed; then we will purge them.

62 objects in it instead of 31, and I never looked.

I have learned that a good change management process, if even just my own, has saved me and my company a few times. Nobody is perfect, and accidents and mistakes and typos happen. The goal is to always be able to efficiently recover.

Sounds like OP was the scapegoat, like you said, for poor leadership and management processes.

11

u/al_bundys_ghost 1d ago

Yep, stuff like the -confirm:$false switches in his script I never do on anything risky or destructive. I’d rather press a key 31 times and keep a set of eyes on what it’s doing before it does it. And if you’ve got a long running script that does updates, always save a copy of the old data and have a rollback script prepared.

6

u/Maro1947 1d ago

Same. Always verify after a pause for delete tasks. Never immediately

10

u/404UsernameFoundNot DevOps 1d ago

I’m personally a very big fan of “type the name of this environment to delete it”.

→ More replies (2)

4

u/SearchAtlantis Staff Engineer 1d ago

Right? I make the data-ops team write up the ticket, add a dry-run, and get another approval before anything runs. And all ops scripts have environment arguments, no default currently connected to be found.

3

u/caffeine-junkie cappuccino for my bunghole 1d ago

Same. Sure it might be 'wasting' some storage, but unless there is a critical need for that storage space, it can wait. If there is a critical need for that space, then that's a separate problem.

2

u/Parking_Fig_9706 1d ago

Its not the first time.

→ More replies (1)

8

u/DDRDiesel Sysadmin 1d ago

A single client being nearly, if not more than, a quarter of the annual revenue is a huge deal. A client that important has a huge amount of sway in how the MSP operates. Mistakes happen, but as you get more experience in the field you learn which clients are the ones you absolutely cannot make those mistakes with. This client was apparently one of them.

3

u/JohnGillnitz 1d ago

It likely wasn't about the mistake. It was about keeping a major client.

•

u/ChrisWsrn 20h ago

During the pandemic I had a guy on my team delete almost 60TB of data in prod. He was panicking after he did it and reached out to me. I told him flat out to come clean and that they would be stupid to fire him after they just spent all this money on "training him" (repairing the damage).

It took us a few months to recover this data from tape. I still work with him and he has not done anything like this again. 

They did originally want to fire him for causing millions of dollars in damage but I argued that he is never going to do it again and he exposed a unknown vulnerability we had in our code that allowed this to happen. We also had him on the team doing the remediation and recovery so I argued that this should be considered a training expense for him. 

2

u/Crazy-Rest5026 1d ago

I agree. Just move you to a different client. Shit happens to all of us in the IT field. It’s how we learn not to do shit like that again.

9

u/AthiestCowboy Account Executive 1d ago

Guarantee there’s more to this story

16

u/WantDebianThanks 1d ago

Employer might be going out of business. I have a "being fires for this mistake seems excessive story" and the company closed its doors 2 months after they fired me.

8

u/BisexualCaveman 1d ago

Yeah, and OP might not even know about the actual nail in his coffin.

3

u/BlackV I have opnions 1d ago

Well I think they know the "final nail" just maybe not the earlier ones

→ More replies (1)
→ More replies (1)

3

u/BitRunner64 1d ago

It would also have been illegal in much of the civilized world. There would either have to be malicious intent or a pattern of serious screwups before termination would even be discussed as an option. Even threatening with firing an employee could be trouble for the employer. 

→ More replies (1)

1

u/northrupthebandgeek DevOps 1d ago

Especially since it's the sort of mistake you'd only make once.

→ More replies (6)

168

u/countdonn 1d ago

They got an emergency BDR restore test for free.

In seriousness, I don't agree with removing a MSP employee or firing someone over a mistake like this. This is a mistake someone will learn from, I run into rank incompetence and negligence on a daily basis. That's now what this sounds like.

69

u/countdonn 1d ago

To add to that, in my experience employers acting this way lead to a culture of hiding and covering up mistakes. Better to be open about mistakes and learn from them as an organization.

33

u/jaymansi 1d ago

What also will happen is that those remaining technical folks will be fearful of being proactive in fixing issues.

16

u/delightfulsorrow 1d ago

To add to that, in my experience employers acting this way lead to a culture of hiding and covering up mistakes.

This. Error culture is a thing.

You never want outages like that to happen, but they will. Somebody instantly owning it and doing everything possible to limit the fallout is the best what then can happen.

On the other hand, there are some who simply don't learn from their own mistakes, stay careless and repeat similar nonsense over and over again. At some point, you have to cut your losses.

It's hard to say where a specific case lands between those two extremes if you only know one side.

9

u/OMGItsCheezWTF 1d ago

I always look at it as "Why fire a guy you just spent all that money training to never make that fuck up again"

Not to mention the chilling effect on honesty.

→ More replies (1)

•

u/mahsab 23h ago

Sure, but you also have to look from the perspective of the client.

"Hey, yeah, sorry we deleted half of your prod environment, but you know, this guy will be 100% super careful next time *chuckles*"

•

u/UpperAd5715 17h ago

We have a lot of hospitals as a customer and every single one of our consultants has managed to impact (part of) a hospital over the years, most of them are due to some evpn/vxlan bug or shitty setup on their end (we only do networking/security) but some have been genuine mistakes. It happens and losing a quality professional over a mistake that's already made (and rectified!) is... costly? You just taught someone else's new employee that they don't know everything yet and should in fact keep paying attention...

I myself technically took down a hospital (new customer since 2 weeks before then too!) in my first 2 months working here, sidenote would be that they only connected one of their two firewalls to their working ISP connections, the backup was still branched to their old connection that was no longer active... Interfaces showed up and HA status showed up but once the active rebooted for upgrades it all went down until it started up again... Took a while before troubleshooting showed us that it had no working connection after spending a small hour troubleshooting HA etc

182

u/Speeddymon Sr. DevSecOps Engineer 1d ago

What kind of idiot fires the guy who:

  1. Owned up to the mistake immediately
  2. Worked actively to recover from the mistake
  3. Brought it all back up within 24 hours (potentially less than the RTO/RPO/SLA)

Yes, you could've done things more safely. But seriously, the client could've pulled the contract and moved to another MSP, instead they just said you can't work in their environment.

This is their loss. Be sure to file for unemployment.

28

u/HideyoshiJP Storage/Systems/VMware Admin 1d ago

Right? I had a big screwup like that, my boss supported me since I owned up and it was the first time. I worked my butt off to fix it, and he bought me dinner.

•

u/spikeyfreak 21h ago

I've seen lots of these over the last 25 years, and no one has ever been fired over it.

I accidentally installed a SQL patch that caused problems with a prod cluster supporting customer processes. Company got fined.

Coworker rebooted ~500 servers at 4PM and took down very important apps. Another one where we were fined by the government.

I deleted DNS entries for about 2/3rds of our prod servers and took ~6 hours to completely recover.

Guy deleted our main internal DNS zone and it took ~10 hours to recover.

Web dev accidentally revoked the cert from our customer facing website (that gets millions of hits an hour) in the middle of the day.

Network guy didn't commit a router config change and took down the entire company for an entire business day.

None of the people involved in those mistakes were fired.

I have seen people fired for lying and trying to cover up mistakes. "What? No, I wasn't messing with printers when every printer in the company went down!" "No, I don't know anything about why those files are gone without a backup!" "What? I didn't use an exploit to give myself more rights to do this thing my boss asked me to do!"

•

u/UpperAd5715 17h ago

As an MSP (in these days) you really should factor in unplanned hours for "oopsies" and CVE patching into your contracts. One of our customers got a nice deal 3 years ago on a 5 year contract and they sure got their moneys worth in these last few months of CVE patching.

•

u/jakubmi9 23h ago

Anytime your company has a big client, the kind that you can't afford to lose, that's how that works.

We're an MSP, but we're owned by the same capital group that our main client is - they're 85%+ of our revenue. If the client wants someone gone, they're gone.

That's why you should always watch what you're saying when users/clients are present, we've had an incident where a entry-level user revealed that she knows the CEO personally when she felt offended by our support guy.

→ More replies (3)
→ More replies (7)

22

u/reader4567890 1d ago

We've all made an epic mistake at some point - mine was accidently deleting the AD OU with every user account in it in the days before "prevent accidental deletion of OU". I restored all the tombstoned accounts, but those restore without group membership info.

It was a painful painful painful afternoon, but I still didn't get the boot because it was a genuine mistake, not an act of incompetence.

I'm surprised you lost your job tbh, especially as you got things back online in a good amount of time and with minimal loss. It was an unplanned and successful use of DR systems imo.

110

u/Loan-Pickle 1d ago

It is a shitty company if they fired you. This was a failure of process and the controls that were put into place.

72

u/thetrivialstuff Jack of All Trades 1d ago

This was also a resounding success of disaster recovery measures. I've seen plenty of environments that would not have been able to recover that fast, to such a recent point in time.

→ More replies (1)

50

u/Nthepeanutgallery 1d ago

I've been the IT Director. That IT Director sounds like a dick. When I was starting out I did a CLM in the on-prem environment we were supporting for a customer and figured when the contracting rep called me in for a "chat" once things were working again I was done, but instead he said what was probably the most valuable thing I was ever told and that I carried with me through my career when I was in supervisory positions.

"Yep, you fucked up; there's no hiding that. But you got to work fixing it instead of trying to hide it, and considering what your mandate is here if you weren't occasionally breaking something that probably means you aren't doing anything so why are we paying you? Don't make a habit of it."

Sorry you got let go but sounds like you did the job, you made a mistake, you learned from the mistake, and you should land on your feet in a place that allows you to be human.

•

u/L0rd_OverKill 12h ago

Let’s not forget the “we just fired the key person risk”

73

u/davy_crockett_slayer 1d ago

Your company fired you for making a mistake?

33

u/valar12 1d ago

Welcome to MSP life. Likely fired to save face with the revenue source.

→ More replies (4)

36

u/CandidTie2249 1d ago

Welcome to every MSP ever.

Companies already hate that they have to have any form of IT. IT is overhead.

MSPs just give these c-level sociopaths more options to make unreasonable demands.

And the MSP is going to accept the unreasonable demands if it keeps the money coming in.

11

u/MemeMan_Dan 1d ago

This is why I much prefer working in my company’s internal corporate IT side of things and not the MSP side of the business. I’d lose my mind dealing with the clients. at least the execs internally actually rather like IT and understand that it’s an investment in the company’s infrastructure and smooth functioning and not overhead to be cut.

3

u/STDS13 1d ago

I'd live on the streets before I worked for an MSP.

3

u/fentablar 1d ago

Poorly structured IT is overhead.

2

u/Speeddymon Sr. DevSecOps Engineer 1d ago

The client didn't ask for OP to be fired. They just said he can't work in that client's environment anymore. The MSP literally didn't lose any business. They might've lost some money for the outage but Jesus fuck-- OP did exactly what he was supposed to do when he fucked up.

→ More replies (2)

20

u/brainchillzZ 1d ago edited 1d ago

The company fired him for no longer being able to use him for the contract that was his sole job at the company. I don’t know how long you’ve been in it or at what level but thousands of people are dumped from major it firms every day for literally no reason let alone taking down a whole client site. When you’re a contract it outsourcing company you can’t afford to keep people onboard that your clients refuse to work with. I feel badly for the guy too, it sucks, but it’s just the reality of the situation

8

u/HTX-713 Sr. Linux Admin 1d ago

I mean, he deleted all of prod... and keeping the same hostnames for DR is a rookie mistake.

→ More replies (3)

8

u/UMustBeNooHere 1d ago

A huge mistake. Sometimes a single mistake can be large enough that it’s a career ender. And from the sound of it, this was a doozy.

4

u/Speeddymon Sr. DevSecOps Engineer 1d ago

His career isn't ended. His job did but he can still work in IT, possibly even at some other MSP, although honestly if MSPs are like this I don't know why anyone would want to go to another after getting fired from one. Sounds like a real shit hole type of job. I've screwed up and taken down production at least twice in my career at different companies and in different ways, and it has never cost me my job.

→ More replies (4)
→ More replies (1)

•

u/Master-IT-All 14h ago

More correct would be to ask, how many mistakes had been made in the past that lead to this?

13

u/SearchAtlantis Staff Engineer 1d ago

You can't say you're a senior IT - dev or Admin until you've broken production.

If I were IT director I'd see this as proof the disaster recovery works.

•

u/sully213 Jack of All Trades 20h ago

What they are failing to realize is that you learned a very expensive lesson. And if you are no longer on the account, then the next guy does not know that lesson and they are at risk of repeating it. I am fairly certain that you knowing your mistake will NEVER make that mistake again. So to let you go after this is complete waste of resource. It's like paying for thousands of dollars of training and then firing you for passing the certification test after. I understand the human reaction to let you go, but the smart move is to retain you. Unless you have a history of making the same mistakes repeatedly, then this was unjustified. Sorry for your situation OP, I hope you find something quickly.

•

u/BryanP1968 17h ago

Exactly this. One of my best memories is when I royally screwed the pooch back in the early 90s, and I expected to get fired over it.

The general manager was an absolute cliche of a cigar chomping gruff executive. He just looked at me and said “Hrrrmm. Well. You’re going to make sure that can’t ever happen again.”

→ More replies (17)

12

u/woodsy900 1d ago

this needs a rollercoaster tag or something haha

Dude that's shitty for getting fired... It could have been worse for them... Imagine their backups were bad. Ugh

Like someone else said. Now you have a sick story about blowing up production haha

3

u/meditonsin Sysadmin 1d ago

They wouldn't have gotten there if backups had been bad, since the whole train of events would have stopped at "restore their critical VMs from backup into the DR cluster."

22

u/SergeantBeavis 1d ago

That’s F’ed IMO.

Back in ye olden days, I basically created the VMware practice at then Perot Systems. One day, when working on the DC floor, I accidentally powered down an esxi host that I thought was a standalone windows box. 35VMs went down for 10 minutes (pre DRS/HA times).

I powered it all back up, made sure the VMs were operating, then contacted the DC manager to tell him what happened. We checked all services and confirmed that everything was restored.

The customer demanded I be fired, but Perot leadership stood behind me. It might have been because I was really the only VMware expert they had at the time. But Ross Perot had always had a policy that honesty and honest mistakes would not be punished. It was a friggin’ breath of fresh air. I always like to say that Perot is where my IT Job, became a Career.

•

u/Master-IT-All 14h ago

Read the OP again, especially telling should be the part where they mention that they confessed because they knew the logs would show they did it.

Does that sound like an honest person and an honest mistake?

11

u/deathybankai 1d ago

Damage wasn’t that bad, and hey you were testing the recovery plan(a little to well).
Should you have got fired no.
Should you specify what you are hitting when using something like Remove-Vm -DeletePermanently -confirm:$false yessss lol

•

u/L0rd_OverKill 12h ago

I generally slap a “Disconnect-VIServer -Server * -Force” at the start and end of all scripts, then have Connect operations that follow startup disconnect scripts.

•

u/RikiWardOG 21h ago

Why is one person responsible for the entire dr test? When something goes wrong you dont point the finger at one person. IT is a team. If something bad happened its on the entire team and it comes down to some sort of process issue that needs to be fixed. So you learned on this what needs to be checked if you were running this code again there should be some validation in the code you're running that makes sure its only targeting exactly what you're expecting it to. This code should have been reviewed by your team and if they were competent ideally someone would have caught this risk. Super dumb to get fired over this. That MSP is going to struggle losing someone like you. You've learned and now time to move on to bigger and better. Get out of the MSP world if you can. Absolutely meat grinder culture of an industry with a ton of ineptitude in leadership.

9

u/Motor-Force4194 1d ago

Trust me, they can fire / release you for less. I am at this point too, 20 + years gone. Having a hard time finding a job cause they don’t like you if you are 60 years old or older.
OP, sorry to hear this happened to you.
Good luck with finding another job. Hope you’re not old like me.
Ooorah

24

u/usps_made_me_insane 1d ago

There are two types of IT workers. Those who have royally fucked up and learned invaluable lessons from it and those who have yet to do so.

I did something amazingly stupid because I was in the wrong terminal window. That one silly mistake caused an event where all hand were on deck.

After we recovered, I went to the VP's office and handed him my badge because I was 110% sure I was gone, so I figured I would save him some time.

He looked at me and said, "I know what your thinking because I was in your exact shoes 27 years ago. I know you feel horrible and I know you most likely just had the worst professional day in your entire life. Yeah, you fucked up big. But you are not getting fired. I want you to take the rest of the week off and go home and relax. Before you come back, take an hour or two and write up what happened, what went wrong and how you plan to change your processes to avoid making a small mistake with huge consequences. Then you and I will review it together and see what we can change as a team so your mistake will lead to others learning invaluable lessons."

RIP Mr. Gregory. You were one of the best leaders I ever worked for.

Sorry you were fired but you will find something better. I would suggest you take some time to write up what happened and how you can avoid something like that ever happening again.

Congratulations, you just earned some major experience points. Your previous company just terminated the guy who will now be extra cautious for the rest of theirir career. That's their loss.

•

u/almathden Internets 22h ago

He was hesitant to accept your resignation because while you turned in your badge, I saw nothing about turning in your gun 😁🫡

→ More replies (1)

8

u/HappyDadOfFourJesus 1d ago

If one client is a quarter of your former employer's revenue, THAT is why you got fired.

Keep your chin up, you'll land back on your feet in no time.

8

u/_litz 1d ago

One thing you can do, scriptwise, to help avoid hitting unintentional targets is always wrap your scripts with connect/disconnect. Start with a global disconnect followed by a direct connect to your target. End with another global disconnect.

This way your code can only ever connect where you want it.

I also follow any get with an out-gridview in passthru mode, so I have to consciously select the items to be acted upon. This adds a level of review and safety.

7

u/spittlbm 1d ago

As the guy who would have received that call, I would have been pissed, but I wouldn't have fired you.

7

u/Szeraax IT Manager 1d ago

I wanna know what you would do different next time to prevent this from happening.

4

u/BlackV I have opnions 1d ago

Best Question

6

u/Szeraax IT Manager 1d ago

Ya, but I'm so late to the party, OP will never see it.

As much as I love the ideas presented in this thread to do things like "have 2 people when you are deleting stuff", there are other things that OP could do without any outside support. Stuff like:

  1. Before any deletion operation, look at the data that you will delete and confirm that it matches your expectation. This applies equally to SQL, VMs, files, etc. I always do a SELECT statement with my where clause before I edit the SELECT into a DELETE. Always do a Get-VM | ogv and think about it for a minute before you then Get-VM | Delete.... etc.
  2. Name and/or color code your terminal tabs by what task they are for. I like to do a red color for anything that is touching a prod env. Don't reuse the same terminal tab for 2 separate prod tasks. When you are "done" with one task, then just close it. If you have a tab that will be open for a week for the full backup process, then so be it. Name it, color code it as yellow, whatever. When you need to do something REAL QUICK or something totally unrelated or even something else that even touches the same env, just open up a new tab and do it and then close it. For OP, I would have had a yellow tab up for the DR VMs and opened up a new tab for the separate ticket action (possibly coloring it as red if I needed it to stay open for more than 2-3 commands instantly).

Honestly, I think that even just these would go a LONG way for /u/Apartheid20 and I don't want to give them too much advice that is more than I would personally do. So I guess I'll shut up right now.

EDIT: one more piece of unsolicited advice that I'd give to any sysadmin is this: don't click away errors or warnings quickly. Always take time to read and understand them. You likely don't want to click on the checkboxes that say, "never show me this again". Those dialogs are there for a reason and the reason is to help you avoid making stupid, costly mistakes.

→ More replies (2)

•

u/Master-IT-All 14h ago

I doubt this is a problem that can be resolved by simple lessons learned.

The primary lesson to learn here is that the poster is a Cowboy.

I love doing Cowboy IT myself, but I keep it to when I'm working on small business after hours. Even then, I know better than to run a fucking script without checking my inputs and outputs.

Seriously, fuck that guy. He makes us all look bad.

17

u/BlackV I have opnions 1d ago edited 1d ago

None of this is on powercli, you did something blatantly unsafe

the cluster cmdlets, the host cmdlets and the server parameter all would have saved you there

validating ANY of your inputs would have saved you there

BUT on the plus side you can now test recovery

I sorry this cost you your job, mistakes happen, sometimes they happen to prod, that's why we have backups that's why we validate, bugger :(

maybe you have a cool war story to tell now

5

u/Organic_Flight1772 1d ago

Or just using a different login that can't nuke prod. Then it doesn't matter if the script is cooked.

4

u/deanteegarden 1d ago

Nuking prod should be a PIM JIT grant with another set of eyes.

5

u/Organic_Flight1772 1d ago

Regardless, OP shouldn't have been able to nuke both environments using the same credentials, role, whatever.

2

u/DueBreadfruit2638 1d ago

Yep. Whenever I'm working in test or DR, it's an identity that has no perms in prod.

3

u/Organic_Flight1772 1d ago

Blaming a junior for bad design is a tale as old as time itself.

→ More replies (3)
→ More replies (4)
→ More replies (5)

6

u/cmhamm Jack of All Trades 1d ago

The only sysadmins who don’t make mistakes are the ones who don’t do anything. You fucked up pretty bad. I have, too. We all do.

Learn from your mistake, and get back on that horse!

20

u/hosalabad Escalate Early, Escalate Often. 1d ago

Pathetic business owner. Because you’re damn sure never going to do that again.

11

u/Lesu__Tokyo__Kokyo 1d ago

We never lost an employee from an honest mistake. We had one guy called “the 1.5 million dollar man” cause we lost about an hour production.

2

u/AnotherCableGuy 1d ago

Who never fucked up can throw the first stone.

•

u/Agoras_song 23h ago

I will gladly throw the first stone... At myself.

→ More replies (1)

10

u/sandfleazzz 1d ago

Hey, look. You screwed up, and you owned it. Just for that I would have kept you around. We get crazy busy and stuff happens.

6

u/Ok-Double-7982 1d ago

Their vibe is sketch to me:

"I called my manager right then and told him exactly what I did. There wasn't any point doing anything else, my username is on every event in vCenter."

Imagine in systems where there is no good audit trail, what this joker would try to pull?

5

u/Parking_Fig_9706 1d ago

DELETE THE LOGS, deny everything and make counter accusations. Seen it before. Will see it again.

→ More replies (1)
→ More replies (2)
→ More replies (4)

5

u/Isaybased 1d ago

Would putting a -whatif after this have helped catch all of those prod VMs? I'll often run a whatif for any type of scripted irreversible deletion before I initiate it.

5

u/PigInZen67 1d ago

At my previous employer we had an engineer accidentally federate our Apple Business Manager environment at the top level. The plan was to establish a subdomain that would be federated to avoid impacting 80k+ employees. Yes, you read that correctly, there were more than 80,000 users at this company that were federated. It was a shitshow that ensued, and completely fucked my plans for improvements to the mobile device serivce. They were a Senior Engineer, and should have known better than be in the interface fucking around. Granted, ABM isn't the friendliest, most careful place, either. Still...

Were they fired? Nope.

You got screwed over, imo.

5

u/Educational_Bar16 1d ago

Everyone makes a big mistake at some point and unfortunately it’s on something they feel comfortable with because they have done it a billion times and so double checking everything seems like a waste of time. Learn from it and move on, I personally wouldn’t hide the mistake either if the next place asked you about your term, when I hire techs for our msp that haven’t made a mistake it’s a bit of a red flag for me.

5

u/CertifiableX 1d ago

Was this the first time something like this happened? Were you on good terms with your boss?

The only time I’ve fired someone for a mistake, it was the third time the same mistake was made, and they didn’t own up to it. Went through tons of hoops from HR before we could let him go, to the point of giving him specific training and check lists to not forget to remove snapshots of our old Exchange server after updates. Then he did it again and took down our email for a day by doing it again.

I’ve been team lead, manager, IT Director, and CIO, and have hired more people than I can recount, and fired more than I care to admit. Most firings were for attendance problems, personal issues, or for inappropriate conduct. Only ever fired one guy for a mistake. I’m curious what else was going on.

4

u/MaelstromFL 1d ago

You got VMware Certs? DM me!

3

u/Pvt_Hudson_ 1d ago

Oof, that's brutal. So sorry OP, I can imagine how that could easily happen.

3

u/krismitka 1d ago

My strongest advice to anyone working on systems is to have a “hands in lap” moment before executing any operations that impact one of those systems. Or a bill. Or both.

3

u/purefan 1d ago

Im sure you will never ever make that mistake again. They will bring in someone to replace you, and that person maybe has not yet learned the lesson you just did

3

u/MonkeyBrawler 1d ago

It's crazy they let you go for this. Most people that actually dig in and get work done, have a story about bringing a place down. Sorry this happened to you, just remember to get one foot infront of the other and find a new job. Internal positions are alot less always on fire, maybe move on from the MSP space.

3

u/de0xyr1b0nucle1c 1d ago

I don’t know many seasoned infrastructure folks that haven’t tripped hard like this. I have several times in my 25+ years in the industry. Live, fuck up, learn, repeat.

•

u/Dapper-Sample2734 16h ago edited 16h ago

This is a good reminder to always specify -Server in PowerCLI, especially before destructive operations. Checking the connected vCenters and verifying the VM count before deletion could prevent a costly mistake like this.

7

u/SorryMaintenance 1d ago

Based on this event alone, I don't understand why you got fired. Yes, you made a mistake, but everyone does so occasionally. You were also completely honest about it and worked toward a full resolution.

This incident should have been used to improve training and procedures, not to fire you. Something like that can happen to anyone in your context.

To me, your firing reflects politics... a move your boss made to avoid losing the client. That is something I cannot fully accept.

2

u/Im_really_bored_rn 1d ago

You were also completely honest about it

For the record, they themselves said they were honest because their name was all of it and they couldn't keep it hidden. To me that sounds like they absolutely wouldn't have been honest if it was a possibility

→ More replies (2)

•

u/itishowitisanditbad 19h ago

Yes, you made a mistake, but everyone does so occasionally

When was your last 48 hours of productivity loss and how many should people be able to make, if everyone makes mistakes?

I'm just curious.

8

u/Sajem 1d ago

PowerCLI multiple default server mode just cost me my job

No it didn't, your lack of attention cost you your job

9

u/AngryKhakis 1d ago

I don’t understand all the people shocked about the firing, what’s the owner supposed to do argue with the IT director that’s 1/4 of their revenue?

That’s the one shitty part about working for an MSP the business is servicing the client and if they want you gone and they pull a lot of weight you’re as good as gone.

If he worked for the company it’s a fuck up for sure but it’s not a critical money making function of the business and happened off hours so he likely gets away with fucking up his weekend.

4

u/Adorable-Clerk-5146 1d ago

People always make mistakes. That was a doozy. However as long as you own up to it and work to solve the problem you created you should not be fired. It’s the people that try to hide their mistakes and lie about it or minimize their responsibility that need to be fired.

→ More replies (1)

4

u/Motor_Chemistry6240 1d ago

You shouldn’t have been fired. Your MSP sucks.

5

u/brisquet 1d ago

This is an honest mistake and has happened to a lot of us. Agree with others that you should not have been fired regardless of the size of the account. They will be hard pressed to replace you, go find someone that will appreciate your talent!

I started color coding my windows so I know which tenent or instance I’m connected ti because if something similar that happened to me. I also name my PS windows too 😊

5

u/Beesechurgers2 1d ago

Why did they fire you for this? This is what backups are for. While you did make a mistake, it’s a great, although impromptu, time to test disaster recovery.

•

u/itishowitisanditbad 19h ago

Did the company even say thank you?

2

u/zsallad 1d ago

I’m sorry. Mistakes happen.

Providing a service to a client though, I understand their position. Still sucks. 👎🏻👎🏻🤘🏻

2

u/luna87 1d ago

Actions like this should require 2PR review

•

u/SeanRinVA 22h ago edited 22h ago

Yeah, unfortunately, that is a definite “dust off your resume“ situation. Especially when the client calls the owner of the company to request you not touch their environment again.

I had one and had my CFO back me up on it, and was able to keep my job. It was a situation of the SAN losing one drive, not alerting me, and then a few months later losing a second drive.

That took about 6 weeks to re-enter lost data because the first drive failure caused my backups to become corrupted. And of course, I was not performing test restores at the time.

I also implemented manual checks of the drive LEDs as well as monthly full restore tests to ensure that we didn't run into that problem again.

•

u/whatdoido8383 Cloud Admin 22h ago

That's what's tough about MSP's, they operate on such thin margins that they had to let you go if that was your main client.

That mistake at a SMB would of been a talking to but it would have washed over. I didn't do something that big but I forgot to remove some snapshots for a critical system after an update and filled up a data store taking down the company for a few hours while we cleaned things up. I got a "that can't happen again" talk and went on to work years at that company.

Best of luck in your search, try to find something not at a MSP.

•

u/MistyPine3356 22h ago

Handling multiple default servers can create extra complexity. Keeping your connections organized and cleaned up helps prevent mistakes and unnecessary expenses. Using automation scripts can make managing them easier and more efficient.

•

u/Master-IT-All 15h ago

Cowboys never live long in the Enterprise.

•

u/GetFuckedReedit 14h ago

Old timer here.  Two things you did wrong.  

1)  Always do a dry run first.  Understand exactly what's going to happen before you do it.  Create and repeat the steps in a lower environment if possible. 

2) Never ever delete anything, until space is actually needed.  Create a trash directory, move stuff into it, then delete only when space is needed via a clean process that follows rule 1.

•

u/persiusone 13h ago

Aside from the mistake of using VMWare for anything anymore, you learned a valuable lesson and unlikely to repeat it. I’d rather hire someone with experience in failure than someone who claims to have none.

•

u/Drylnor 7h ago

Fuck these companies. Mistakes happen. Even serious ones.

4

u/Apprehensive_Bit4767 1d ago

I made a similar mistake except that was the system administrator of the company itself and they didn't fire me they gave me another chance and I never made a mistake again but I learned from that mistake and made myself better and in overall I made the company better

3

u/fwdandreverse 1d ago

My sympathies. I don’t believe firing you is fair or sensible. Now whoever gets that job next time won’t have made the same mistake and learned from it and they could even get a repeat performance. Far better to keep you knowing you will be super careful next time.

•

u/itishowitisanditbad 19h ago

Now whoever gets that job next time won’t have made the same mistake and learned from it and they could even get a repeat performance

Absolutely true.

If everyone learned by expensive mistakes.

Unfortunately thats not accurate but in a world that it is, you'd have nailed it!

3

u/DeadOnToilet Infrastructure Architect 1d ago

Sanitize and validate your inputs. 

•

u/kdf93ndbn28 19h ago

So now your company has to search for a new qualified person for your position. Instead of keeping you knowing that you will never ever do that shit again and that you will always double check in the future?

Their loss.

•

u/max1001 18h ago

If the client is 25 percent of the business and they don't want him on their account, what do you expect the boss to do?

→ More replies (1)

•

u/Master-IT-All 15h ago

Remember, this is a person posting their version of events. Do you really think they will have written this in the worst possible way?

The OP seriously went Cowboy in the Enterprise and found out what happens when you shoot first and ask questions later.

3

u/AnnoyedVelociraptor Sr. SW Engineer 1d ago

I'd want you on my team. You're never gonna make that mistake again.

•

u/Master-IT-All 14h ago

They made several, which mistake are you referring?

Would you really trust someone on your team that confessed to running code against prod because they didn't take five seconds to check their terminal window? What about someone that ran a script without review? What about someone that took input in a terminal, didn't verify what they had taken into the variable, and then used it?

What about someone that states that they only confessed because the logs would have outed them?

→ More replies (1)

2

u/Ok-Bill3318 1d ago

Yeah this one is on you buddy

2

u/bazfum 1d ago

So now they fired the one person who will never ever make that mistake again…

→ More replies (1)

2

u/Bymmijprime 1d ago

Sounds like you initiated an appropriate corrective action immediately. A company that fires for honesty and transparency is incentivizing employees to lie. Mistakes occur, good people make them all the time. So sorry they treated you that way.

•

u/itishowitisanditbad 19h ago

A company that fires for honesty and transparency is incentivizing employees to lie.

They didn't fire them for honesty and transparency.

You know being disingenuous is just silly right?

Do you genuinely believe they fired OP for their honesty and transparency? Could you perhaps word out how that would go in a meeting without mentioning anything else?

You know, since they got fired for that apparently?

Disingenuous people really invalidate anything else they ever say. You should worry about that.

•

u/slayer991 Sr. Sysadmin 22h ago

Sorry that happened to you and that sucks. I can understand the customer being upset, but that stuff happens...and it wasn't fatal. It's sad that fired you for a mistake you owned and stayed through to fix. WTF. I think if this response to these types of mistakes was the standard, we'd all be screwed.

Many many years ago (more than 20) and early in my career, we had a reboot script that read a text file. I had a list of 10 servers that I had change control to reboot during the day. I edited the text file and ran the script at lunchtime. Cue my surprise and dismay as it started rebooting all 650 servers. I ctrl-Ced out after about 75 servers had been rebooted. Can you guess what I didn't do? I didn't save the text file before I ran the script and it had ALL of our servers from the previous weekend's patching. That sinking feeling of "Oh, I really fucked up" hit me and I thought I was done.

I immediately walk over to my boss and own it. He tells me to monitor them to make sure they all come up and own the ticket queue. At the end, monitoring found one server where it needed some special care and handling to come back up. Only 2 tickets and the systems were back up...no real impact.

At the end of the day my boss asked me to come into his cube...now I'm dreading it. He asked me, "What did you learn from this?" I said, "Double and triple-check everything before running anything that can take down production." He said with a smile, "Very good, go forth and sin no more."

I haven't forgotten that lesson 20+ years later. I STILL double and triple-check everything when doing production changes. Hasn't bitten me since. Great boss too....probably the best one because he turned me into an IT Professional, not just a good tech.

Hopefully, you'll find a gig that will allow you to grow professionally...which includes making mistakes. We've all been there...it's how you improve.

•

u/Workuser1010 22h ago

honestly fuck those guys.

errors happen and none of this cost any lifes or anything super serious. you failed, you fixed and it cost them a day of work with the assurance that you can actually fix things if something goes to shit.

people are to detached, and forget that their bullshit complaint to feel important can cost someone their existance!

•

u/itishowitisanditbad 19h ago

it cost them a day of work

2, 1 day loss and 1 day recovery.

•

u/dhardyuk 19h ago

Shit.

Imagine if their email went down for a day.

→ More replies (2)

•

u/pnf365 22h ago

Thats a big mistake to make tbf. Even in test environments, if i were using scripts i’d be at least getting it to confirm the specific VMs and only power off. Never delete straight away.

2

u/doalwa 1d ago

People should be allowed to make mistakes, we’ve all been there.
I can’t wrap my head around this hire and fire mindset in the US.

1

u/GoodEnoughThen 1d ago

Wow, cazy story. I'm sorry you got let go.

1

u/DialMforMordor 1d ago

The good news is you will never make that mistake again. In that respect, you have leveled up.

1

u/Proud-Manufacturer15 1d ago

mistake on your part but that infrastructure doesn’t sound very… eh duck it lol

1

u/Nervous_Counter_1333 1d ago

Shit thats sucks. Everyone makes mistakes

1

u/EJUnleashed 1d ago

I've had techs do worse. It was my job to handle the client. Never lost a client over a simple mistake and never fired a technician over a stupid one off mistake

1

u/sleepmaster91 1d ago

I once restarted a production hyper-v server thinking i was working on the DR one. Yes the customer's users started calling tech support asking why the servers were down but no data lost and we were quick on getting everything back up and running. All we did was apologize and move on

We also once had a failed merged hyper-v snapshot issue for that same customer and users were reporting lost files that they worked on the previous day. We were able to fix the problem and the files were back on the main vhdx file. Again we got everything back and running quickly

This customer is still our customer till this day

Sometimes shit happens and it's better to own your mistake than try to hide it

Your MSP was a dick firing you on the spot for this they probably got pressured to do so by this customer and they wanted to please them because money talks

2

u/charleswj 1d ago

You take the off the contract, how would they even know? It's a bs action.

1

u/Tb1969 1d ago

They should not have let you go.

They should have had the script detect Production connection and not proceed. The script should have instructions on how to execute it in Production if needed but very deliberate steps needed to be taken for it to execute in Production. Your company should have ensured human error was minimized so this is your former employers fault, not yours to the degree of termination.

1

u/BBO1007 1d ago

Maybe the next guy that makes a mistake there should just walk out instead of helping with the recovery?

1

u/ycnz 1d ago

Moral of the story: Next time, delete the rest of the environment, may as well try to kill off the audit logs. Nothing to lose.

1

u/Grrl_geek Netadmin 1d ago

Oh man, reading that triggered some PTSD, seeing stuff you're not expecting or a task is taking waaay longer than you expect.

1

u/Timberwolf_88 InfoSec Engineer 1d ago

In Sweden it would have been illegal to fore OP over this.

No, you did not deserve to get fired in this instance, you should've argued against it and brought in help from your union reps.

1

u/UseMoreHops 1d ago

That's pretty rough getting fired. They didnt lose the account, they jsut didnt want you working it. Every one of us has major fuck ups in PROD. Its what makes you experienced. lol sorry that happened man

1

u/InfinityConstruct 1d ago

Go find a job for a real company and tell this story in the interview.

And double check your shit next time you run delete scripts on vms. You'll be good.

1

u/Sea_Effective_9108 1d ago

I have seen fortune 100 companies fire people for a lot less.

1

u/gullelite 1d ago

I don’t agree with firing you. There were insufficient safe guards in the process and multiple failures caused the issue. Anyone could still make the same mistake. Additional manual checks or policies to prevent auto accept on those scripts or a preset script are all options that are available to mitigate the risk.

1

u/DonL314 1d ago

Sad story, I feel bad for you.

That's why we have check lists.
Before and after each step, verify conditions.
And use scripts.

I'm sure you've learned that and will check carefully in the future for this and other changes.

My surprise is that so many IT orgs don't do it, and don't live that culture.

1

u/Key-Butterscotch3215 1d ago

Idk I would get fired for that if I did the same. Just take it as an opportunity to get better

1

u/ls--lah 1d ago

I mean, PowerCLI didn't cost you your job, you did.

Firing you over it was still stupid. It'll be a funny story to tell in a few years time anyway. 

1

u/myp0wa 1d ago

Damn, it sounds for me like it was just oversight which could happen to anyone for example case where there is big amount of work, high speed of doing things and mainly routine. Feels bad for You but hey, let’s all leran a lesson here. For sure You will find something new!

1

u/malikto44 1d ago

In my experience, what happened with the MSP is that they needed someone to sacrifice to appease anger, and the above was it.

It was over 10+ years ago, thankfully. I was working at a MSP that wouldn't put any money into backups. When I mentioned that I was not backing up the test environment because of lack of capacity, it was ignored. This was on a daily status report.

When someone couldn't restore a backup from test, I was given the bum's rush, told that it happened on my watch, so I was responsible, budget or no.

The funny thing is that the client did an audit, found out exactly what went on, fired the MSP, and offered to re-hire me. I declined, as I found better work.

Shit happens, and every admin worth their salt has done stuff like this... or worse. This is a good test of the local storage's snapshot system because I had an admin do something almost identical... and was able to roll back all the affected VMs without needing to go to backups.

1

u/rankinrez 1d ago

Meh I mean that just sounds like a bit of bad luck. Happens to all of us from time to time firing you seems insanely harsh.

1

u/jkeegan123 1d ago

Yikes!

In the future, add - whatif to powershell runs on prod systems.

•

u/UltraEngine60 23h ago

It's your fault for automating it. /s

Seriously though, why did your account in prod have privileges to DR vcenter and vice-versa?

•

u/MahaSuceta 23h ago

Live and learn and what doesn't kill you, make you stronger.

TL;DR Learn and Prosper!

•

u/Iyemoja 20h ago

62 instead of 31 is the kind of number that should make your stomach drop before you hit enter. I now check $global:DefaultVIServers like it owes me money, and I color-code every prod window red.

•

u/livestrong2109 20h ago

Ohh God I've definitely made a similar mistake in the past. The difference is I was able to roll it back without anyone saying anything.

•

u/maplewrx IT Manager 20h ago

I wouldn't have fired you...but that why I like tools like Zero for DR over scripts. Humans make mistakes.

Our leadership team fired a senior tech for similar reasons. Logged into production by mistake.

The important lesson here is that PowerCLI is not to blame.

For critical operations, a pre-flight checklist to ensure you're connecting to non-prod is the safe way.

•

u/420GB 19h ago

It is incredibly amateurish to not have the VCenter connection done in the script. Really it means that this script of yours doesn't even work since it relies on a connection already being established and it makes this a "snippet" and not a script. A script is something you can run and it works. This is something you have to paste into an already otherwise prepared running PowerShell session.

If this was an actual script and the VCenter connection was included then this would not have been an issue. The fact you used this snippet three times already and never thought to include the Connect-VIServer call in there is bewildering for many reasons not least of which is fear of this exact and fairly obvious dangerous thing happening.

•

u/mr_lab_rat 16h ago

That’s an epic fuck up by you but even bigger one by the employer.

Unless they lost the client and need to downsize there was no reason to fire you.

•

u/killpacket 13h ago

OP should have just powered off the servers, let them sit for a few hours or a day, then ran the delete routine. Would have caught it immediately.

•

u/tusk354 12h ago

always do deletes manually... for this reason alone . even if automated, as a seperate step.

•

u/malice8691 10h ago

I deleted prod 2x. It happens sometimes. It should not be a firing offense.

•

u/eatfesh 6h ago

I was running a get-VM command just yesterday and also noticed Vcenter scripts can pull from multiple vcenters if you don’t clear/disconnect from them beforehand. If you’re not used to connecting to multiple vcenters then it can easily take you by surprise. Hope you can bounce back

1

u/Incrediblecodeman 1d ago

Gotta break some eggs man. When god fires you. He also gets you a new job! You’ll be fine :)

1

u/ehode 1d ago

Things happen.

If I was the customer in this scenario, I’d ask to meet with the MSP for a Post Mortem. If they explained the scenario that just happened I’d poke around on what they are going to do to safe guard this in the future.

I’d share with the rest of the leadership group, note it for internal write up and move on. May trigger at renewal time with the MSP that we are looking at some other providers for quotes.

At no point would firing or retaining the engineer that did this be on my mind.

1

u/Charming_Cupcake5876 Jack of All Trades 1d ago

Getting fired for making a mistake in IT says management isn’t in touch with reality. I been there brother. Stay strong and live by my words: “the sting wears off eventually”

1

u/wtjones 1d ago

Process is always the problem, not people.

1

u/_Gobulcoque Security Admin 1d ago

Firing an employee over these kind of mistakes is mad. You're letting go of someone who will never make this mistake again, and warn everyone else to never make this mistake.

It's expensive but the best training a company will ever get.

The next guy they replace you with won't have made these mistakes, and opens the company to the same risk (in theory) and loses your institutional knowledge. Just crazy.

•

u/garryevanson99 15h ago edited 15h ago

I wouldn’t worry about it

Mistakes happen and I wouldn’t want to work (and haven’t) somewhere that fires staff for a mistake.

Backups are also designed for these scenarios as operator mistakes do happen - if they needed a better recovery point they should have paid for more frequent backups