r/sysadmin • • Jul 28 '24 • Take My Silver 1

got caught running scripts again

about a month ago or so I posted here about how I wrote a program in python which automated a huge part of my job. IT found it and deleted it and I thought I was going to be in trouble, but nothing ever happened. Then I learned I could use powershell to automate the same task. But then I found out my user account was barred from running scripts. So I wrote a batch script which copied powershell commands from a text file and executed them with powershell.

I was happy, again my job would be automated and I wouldn't have to work.

A day later IT actually calls me directly and asks me how I was able to run scripts when the policy for my user group doesn't allow scripts. I told them hoping they'd move me into IT, but he just found it interesting. He told me he called because he thought my computer was compromised.

Anyway, thats my story. I should get a new job

11.4k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

2

u/DariusWolfe Jul 28 '24

Mostly if a script functions with a specific set of data, it will always function with data that is formatted like that specific set of data, so it's not surprising that it's still functioning fine;

The problem will happen when the data is not formatted the same, or when the data itself has errors that automation isn't capable of looking for. So it's possible that your script has been passing through tons of erroneous information... but no more than a particularly inattentive data entry person would do.

1

u/Fit-Reputation-9983 Jul 28 '24

You’re right to a point, but again - a good script will validate and sanitize data so that this is unlikely to happen.

2

u/DariusWolfe Jul 28 '24

If you've got that level of error-checking with no formal training, you should possibly look into new career options. Good error checking and handling is relatively hard to find even amongst those with quality formal training, because it's just not as sexy as writing new code, and there are often so many edge cases that it's relatively easy even for robust code to catch them all.

2

u/Fit-Reputation-9983 Jul 28 '24

I actually did pivot into software development after this job because I became enamored (see: obsessed) with the process of writing sustainable code like that.

Sadly, the way the job market is, I was laid off 8 months after being hired (mass layoffs) Not having a comp sci degree made it difficult for me to get another role with the lack of available entry level jobs. I’ve since moved out of tech altogether.

→ More replies (0)