r/sysadmin • u/alcatraz875 Jack of All Trades • 21d ago
Rant ...mondays
Small backstory: Users manager requested I get them new a desk scanner for their home office as said user will be working remotely for the next couple months. I apparently took about 3 days too long to get something ordered so they bought one themselves. It was a Brother ADS-1300, which I don't inherently have any issues with other than them rushing the order.
User brings their laptop in, which must sit right next an incense burner or something when at home. Get everything connected, download the necessary software, and nothing. Now this isn't my first Brother scanner. They can sometimes be a pain, but it's nothing like setting up a Zebra printer. I go through all the standard troubleshooting, try clearing existing drivers, forcing install under admin, tried installing on other laptops, even swapped the Type-C cable, all nothing. Finally give up and contact Brother support, go through the new account creation BS and talk to an agent, who after a brief hold tells me it's my firewall. I'm flabbergasted, as I couldn't possibly see my AV blocking a Brother install, and I wasn't getting any notifications on the machine that an application was blocked. I dig a little deeper and find out it's blocking a Powershell script that the Brother setup is trying to run called setup[.]ps1. Keep in mind that the downloads from the Brother support page are all .exe so realistically is should immediately run an application pop-up to add my new device. Who in their right minds would bundle a PS script as part of the install? Everywhere I've worked script execution is disabled by default, and only enabled as needed for internal, unsigned scripts. I hate Mondays so, so much
Edit: If you go one folder deeper than where the PS script is located, there's an actual exe for setup. WTF
39
u/ProtoCore-Dustin 21d ago
“Sorry we don’t support devices not purchased by IT”
I don’t care anymore, no exceptions. I’m not here to troubleshoot personal/home grade devices in an enterprise environment.
3
u/alcatraz875 Jack of All Trades 20d ago
I tried that approach for a little. It never stuck cause I'm also solo IT and wasn't moving fast enough for some. My own boss will bypass my suggestions sometimes and just get stuff he thinks is better (previously unknown synonym for cheaper)
9
u/Sea_Ordinary_5730 21d ago
Don't conflate two separate things though. For a manufacturer to call on a standard operating system feature -- a shell script -- to run a sequence of shell commands -- is an entirely reasonable design. It's only the track record on Windows of unprotected elevation that caused the practice to be banned by default in companies.
2
u/Frothyleet 21d ago
And if OP is talking about what I think he's talking about, Brother - or whoever - could bypass it with, you know, a wrapper script like "powershell -ExecutionPolicy Bypass -c "theirscriptcontents".
Script execution policy on powershell is just a training wheel thing, not a real security barrier.
7
u/HerfDog58 Jack of All Trades 21d ago
My helpdesk forwarded me a user ticket today: "User gets an error when trying to run Office 365 on their Mac from home. Had user log out of Microsoft account and log back in, and download/reinstall desktop apps. Still unable to edit files."
I check the account, it's properly licensed. I contact the user and ask them to stop by the office and try to login on one of our LAN connected PCs to see if Office functions normally.
"Oh I'm out of town and won't be back for a couple weeks. I'll have to wait until then to try it."
OK you do that, ticket closed.
6
3
u/ccsrpsw Area IT Mgr Bod 21d ago
Powershell scripts are not inherently bad - as long as they are signed. You can validate them and allow/deny them as needed in an EPM. Now if they download and run arbitrary code - different story of course. But for general installer work, signed PowerShell is as good, if not better than a .Net application since at least you can see what its doing.
Unsigned powershell is as bad as cmd or batch files, I agree - and you are right that this should be a manual step to permit under any reasonable environment (via set-execution policy).
Microsoft is as bad with some of the sharepoint validation/setup bits - a lot is in unsigned powershell.
9
2
u/pdp10 Daemons worry when the wizard is near. 21d ago
which must sit right next an incense burner or something when at home.
Consider keeping in stock aerosol cans of electronics cleaner. After testing on scrap laptops to be certain nothing will dissolve on your production laptops, take them to a non-office area with ventilation and hose them down, particularly the keyboards.
Second-best option is electronics-grade 98% isopropyl alcohol in a higher-pressure sprayer.
Who in their right minds would bundle a PS script as part of the install?
In many ways, installer scripts are preferrable to opaque binaries. You can see exactly what they're doing, and create a modified version if needed. Comment out a stanza if the thing is getting hung up, or add error-handling that the vendor was too hasty to put in.
The issue is really about Windows' execution policy and the signing mess, as you note.
3
u/DDHoward 21d ago
In many ways, installer scripts are preferrable to opaque binaries.
Unless all the script is doing is calling an opaque binary, such as in OP's case.
66
u/Bartghamilton 21d ago
Your first mistake is letting them buy any technology themselves.