How to monitor a printer with Powershell

When it comes to monitoring, as much I like scripting languages, it is never my first choice to rely only on a ‘custom’ script. Considering how many variables are involved: requirements, environments, the overall experience of the team that will manage that piece of software, and all efforts to develop, test, and support the solution over time.

I prefer the implementation of any monitoring solution with basic out-of-the-box features and add on top some scripts if required to reduce the overall codebase to read/maintain. It is not only an early optimisation of a cost/benefit analysis, but it is derived from my professional experiences in different companies and a consideration of the balance needed between the business goal/expectation and the technical value offered by the suggested solution.

In this article you will find something totally different, I wanted to take the opportunity of helping somebody to solve a real case of a Virtual Printer that was causing issues to users and the ops team. The printer needed to be monitored with a living-off-the-land approach, so without adding any software solution but just a few scripts.

Continue reading “How to monitor a printer with Powershell”

Updating Windows Subsystem for Linux (WSL2)

I must admit that I’m a very strong fan of Windows Subsystem for Linux (WSL) 2.  It’s definitely something I’m happy to use every single day, regardless that I have few Linux VMs and a couple of apps running in docker containers on my workstation.

I cannot say that the new version has substantially reduced the number of tools yet, but there is the chance that in the future WSL2 and (Linux) docker containers will be the only things running all the time on my system. The Hypervisor will be just used for running some VMs on demand when needed.

Continue reading “Updating Windows Subsystem for Linux (WSL2)”

Using PowerShell to Clean Up Sophos Temp Files

using-powershell-to-clean-up-sophos-temp-files

Recently I’ve encountered a strange issue that affected one Windows workstation with Sophos AV (Endpoint) software installed.  Sometimes this software creates some temporary files with ‘$$$’ extension and apparently it never removes them.

I thought that the process of analysis and implementing a solution for this edge case was perfect for an article and it is applicable to many similar situations when scripting is required to collect information or mitigate.

Continue reading “Using PowerShell to Clean Up Sophos Temp Files”