Skip to main content

RunningLow – A free PowerShell script to check for low disk space and send e-mail to System Administrators

Today I would like to share with our readers RunningLow, a simple yet effective PowerShell script I coded a while ago to get to know when one of my servers is running low of disk space.

Whoever works with physical and/or virtualized Windows Servers is well aware of the importance of keeping this constantly under control: as soon as a server runs out of disk space it will be unable to fullfill a number of tasks, such as: create temporary files, store data on a database, performing system maintenance / backup / updates, create or update web sessions – assuming they are handled through I/O – and so on. Things can be even worse for those servers who host DBMS services such as MySQL and MS-SQL, as the sudden I/O unavailability could cause non-trivial damages to indexes, filesystem-based tables and data integrity.

The main purpose of RunningLow is to prevent all that: it will check one or more local and/or network drives to see if their available free space went under a certain quota, and send a customizable alert to one or more e-mail addresses if that’s the case. I know, there are A LOT of admin suites and maintenance software that could be easily configured to the same thing: even Piriform’s CCleaner PRO does that! However, if you don’t have the money, the time or the amount of system resources required to install these apps, you might find out that this lightweight alternative could be worth a shot.

Read More

WannaCry: how to check if your system is protected using a PowerShell script

If you’ve stumbled upon this post you are probably well-aware of the Win32/WannaCrypt Ransomware, better known as WannaCry: we already talked about it in this other post, which contains an extensive list of links to download the various patches to shield almost any Windows-based operating system against this dangerous treat.

However, you might also need to find a way to quickly check if your system is effectively protected against WannaCry or not: this could come very handy if you are a System Administrator and you don’t know which server is missing the updates or not. Altough the best suggestion we can give would always be “patch everything”, you can also use this great PowerShell script (which we stole from this great post from SpiceWorks community site – credits to CarlosTech for the great job):

Read More

Manage IIS Log Files and purge those older than N days with a Powershell script or a batch file

Any System Administrator will agree that the Internet Information Services log files are an invaluable resource for any Web Server machine, since they are the only built-in tool that allows to effectively keep track of what happens among the web sites and services configured within the system: who requests what, where they are from, and a lot of useful informations regarding our visitors and guests. To see a list of the available info we can collect with the help of this feature, we can visit this official page who documents the W3C Extended Log File Format, which Microsoft adopted since IIS 6.0.

Overwiew

Needless to say, we’re also free to choose what we want to track: we can enable or disable each one of the aforementioned fields by opening the IIS Manager, double-clicking on the Logging and act accordingly, as shown in the screenshot below:

iis-logging-screenshot

Like we said above, activating the logging feature is not a choice: a good administrator should always keep it enabled for a number of good reasons, including – yet not limiting to – statistical purposes. Just to make a quick example, guess what it could happen if someone tries to use the “file upload” feature available through one of your websites to send banned, restricted, forbidden or copyrighted content: as a result of this the local authority could run an investigation out of your system, which you could easily pass by showing your IIS logs together with a proper explanation of what really happened… unless you turned that feature off to save HDD space!

Read More

Disable Internet Explorer Enhanced Security in Windows Server 2012

If you’re a System Administrator and you’re working with Windows, you surely know what happens everytime you install a new physical or virtualized Windows Server machine: you’re basically unable to download anything because the stock browser (Internet Explorer) blocks any unauthorized connection by default, leaving you with the following choices:

  • Allow hundreds of websites to download from the web everything you need.
  • Allow only the websites required to download Mozilla Firefox or Google Chrome website, download a different browser (with less restrictions) and use that instead.
  • Turn off the Internet Explorer Enhanced Security settings.

Honestly speaking, I often use the second option: however, with the ton of CDN and alternate location URLs used by the download distributors/managers within these past few years, authorizing those needed to allow a Google Chrome or Mozilla Firefox download can be rather slow. This post will guide you on the third option.

UPDATE: One of our readers also suggested a fourth viable option: installing Google Chrome with a Powershell script: if you want to follow that route, we suggest you to read this post. Many thanks to scottt732 for sharing this!

Read More

Close