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”

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”

Monitoring the Network Load with Powershell

monitoring-the-network-load-with-powershell

Monitoring is an important activity in IT operations, it’s essential for correlating the state of all the moving parts of our systems and applications and create a big picture of the health of the whole environment.  Before going down the rabbit hole of complicated monitoring tools and techniques let’s start with define a that monitoring can be subjective and on a case-by-case can be very basic or detailed and can let you choose a specific tool or strategy. There is no one-size-fits-all. This week I needed to implement a custom check to monitor the network load/usage on any Windows OS and instead of looking for a third-party tool and deploying maybe another agent on servers I wrote a Powershell script to perform this activity.

Continue reading “Monitoring the Network Load with Powershell”

Apache Is A Swiss Army Knife

There are tools that are extremely useful and once configured properly will last a long time with little or no maintenance required at all. Web servers are a common example of tools that come to my mind that can be a swiss-army knife and serve a lot of purposes.

Whether you choose Apache, Nginx or IIS, just to pick some of the most famous ones, it’s very important to know at least most of the features that they offer. So it’s very important to get familiar with at least one of them, reading the documentation and start experimenting a bit.

Continue reading “Apache Is A Swiss Army Knife”