Monday, February 21, 2022

Bungle in the jungle

2/21/2022: WFH, long hours, long weeks (plus-side, commuting across the hall, has *distinct* benefits!😁) == *no* recent posts. But, I have still been churning out rafts of code! Which you can check out over at my GitHub Repos:github.com/tostka. Variety of tech & home toys built. Just no time these days to post about 'em. 😲🤷😂

Friday, January 1, 2021

Migrating Chromebook printing for an Epson, when the generic model doesn't exist in ChromeOS...

1/1/2021

: Fun times on the homestead: Got to spend hours today getting my wife's Acer Chromebook to print to our five-month-old Epson ET-M1170 'Eco-Tank' monochrome Inkjet. 

Issue:  Google Cloud Print was folded by Google as of midnight last night (12/31/2020). 

Workaround: Migrate your Chromebook(s) from the long-standing Google Cloud Print middle-man, to the newer ChromeOS direct printer connection support in Chrome OS 59 or later...
All great in theory, unless your particular printer *isnt* covered in Chrome OS... My wife's *wasn't*. 


Monday, April 23, 2018

The Big Picture (Powershell log-spanning event script)

4/23/2018: This is a quick 1-liner script aimed at pulling all eventlog events over a specific time span, across multiple logs. Gives you the 'high-view' timeline of the sequence of events, when you're trying to correlate that odd issue to a root cause.

Sure you can check each constituent log - System, Application, and a Crimson/App-log one by one, and mentally compare the time sequence across the logs.

But the handy bit to this chunk of code is that it quickly & neatly pulls all of the events together into one csv, sorted into time sequence, ready for quick review: Pop the Csv open, and you can directly see the events that occurred just ahead of your app's issues - possibly spot the OS/System-level item that actually was the actual root of the problem. :)

Thursday, April 5, 2018

Exchange newest mailbox redistribution script (move-MailboxesMostRecent.ps1)

4/5/2018: This script leverages the Exchange-2010+ 'Automatic Mailbox Provisioning' (AMP) feature, wherein, if you don't designate a specific destination database for a mailbox move, AMP will pick one at random for you (following some predictable rules, covered below).

When moving mailboxes, to redistribute load, the most 'easy-to-move' of the bunch, are boxes that are brand new, or those only in use for a very limited amount of time.

Thursday, March 29, 2018

PS template - Splatted update snippet


3/29/2018: Over the years of working with Powershell for quick admin work, I've become a sizable fan of splatting powershell commands.

First a 'Splat' Introduction:

 

For folks late to the party, "splatting' leverages standard hashtables to encapsulate 'sets' of parameters for commandlets. The short form is that you take all the parameters you'll be feeding to a given commandlet, configure them by matching name->value combos into a hash varable, and then, by specifying the hash variable with an 'at' (@) prefix rather than dollar-sign ($), Powershell & the commandlet interpret your splatted hash table as the set of parameters with which to execute your desired command.

Powershell script: Check HP Array Config Utility CLI

3/29/2018: Script that can be used to collect drive-failure errors out of HP Array Config Utility (via the CLI tool).

I'm in the process of migrating my firm's core mail assets to Exchange Online. But, in the interrum, I've still got some aging original hardware holding users. Which, naturally with increasing hours of uptime, sheds old drives on a regular basis.

I generally like to have SCOM watching & alerting on this type of material.  But some of these systems run in locations that are somewhat 'adverse' to going deep on monitoring infrastructure and overhead.

So, when faced with a challenge, we roll up our sleeves and roll-our-own ad-hoc solutions to keep those old boys propped vertical, at least until I can finish draining the hosted users online. :D

Sunday, January 7, 2018

Exchange script: Fix broken migrated email addresses by splicing the historical LEDN in as a new X500 address

1/7/2018: I was working on a mail migration and needed to dust off and use this script, so I figured I'd go ahead and post it.

The underlying purpose for this script is, to workaround and suppress...
    # 550 5.1.1 RESOLVER.ADR.ExRecipNotFound; Not found'
... errors for users replying to email that has been migrated from an external mail system.

Friday, October 13, 2017

Exchange post-reboot emailed status confirmation script

10/13/2017: If you've got a lot of servers to keep track of - whether doing maintenance (patching), or experiencing the inevitable random reboots/unscheduled-virtualization-burps/what-have-you - you want to know the full status of the system, as quickly as possible IMMEDIATELY after it comes back online. To that purpose, this script is the current rev of a series I've been using for the niche since 2007 or before.

In this case, it's the Exchange-specific version. I generally configure it as a Scheduled Task triggered by the OnBoot event (with a fire-delay for Win2012R2+). The script logs a transcripted file & emails an html-format report, covering the following tests & status:

Thursday, September 28, 2017

Powershell server RDP ping availability script

9/28/2017: Just a quicky today: A couple of quick bits I keep in my profile, and routinely leverage for server maintenance. Run ping-RDP.ps1, it will prompt you for a target server, and then run a looping port-test (1sec interval), until it detects the RDP port 3389 is up on the target box. At that point it launches an RDP session (mstsc.exe /v:$($tsrvr). Pretty simple, but handy when you're doing concurrent maintenance across multiple boxes.

Friday, September 22, 2017

Exchange Hub Top Queued Domains (Powershell Snippets)

9/22/2017: Here's a couple of quick code snippets for Exchange Server: I use this when I see external delivery domains piling up (in my running get-HtQueuesMonitor.ps1) , to quickly pull out the details on the problem child external domains.

Thursday, June 15, 2017

convert-ToMp3.ps1 Powershell script for ffmpeg or vlc player

6/15/2017: Sometimes, you just need to convert that video into an mp3 file. You, know, something to take along in the car. Something to spin at your next 'rave' (ho-hum). :P

So what I have here, is a Powershell 'wrapper' for ffmpeg or VLC Player's native ability to convert video's to Mp3. Sure, you could use ffmpeg's command line, (or VLC's Media > Convert\Save menu). But sometimes you want to convert a whole batch, or directory, or recursive directory tree! And that is exactly where this .ps1 comes in.

All you need to do is download and install one or both of the above. I've found that ffmpeg works more consistently and bug-free than VLC. But take your pick. And then get-content c:\path-to-videos\. and pipeline them into the script, and you're off to the mp3 races. Docs and examples are in the script comments.