Move witness disk in SQL cluster

I ran into the issue where CAU (Cluster Aware Updating) was working as intended, but on my SQL cluster, this meant that the SQL cluster disks were still available in the Failover Cluster, but the witness disk was active on the non-active node. Which meant that if I did queries on the cluster, it would … Continue reading Move witness disk in SQL cluster

Move images based on dimension

A while ago I created a script to copy the Windows 10 lock screen images, this puts all the files in 1 directory. I wanted to sort those images based on their dimensions, so I move them to two different folders, one called "landscape" and one called "portrait". The script is pretty easy, first I … Continue reading Move images based on dimension

Find text (string) in text file(s)

If you want to find a certain text (string) in a text file or multiple text files, the quickest way to do so, is by using the select-string option. First you'd need to get a list of the files you want to search trough: $FileList = Get-ChildItem -Path "D:\temp\" or you can use it on … Continue reading Find text (string) in text file(s)


The Get-Date cmdlet is pretty nifty and gives you a lot of date/time formats you'd want to use in your script. Like if you were to save files with a unique stamp, you'd want a date/time format like <year><month><day><hour><minute><second> Here are some examples to achieve this goal, with outputs Get-Date -Format s 2015-11-19T20:22:35 (Get-Date -Format s).Replace("-","").Replace(":","").Replace("T","") … Continue reading Get-Date

Notepad++ downloader and updater

I love to use Notepad++ (npp), but I also have npp installed on servers on which users can log on, but don't have administrative privileges. They also love to use npp, but with the updater enabled, they get popup messages for the updates, but cannot install them. I don't want to have to check all servers that I … Continue reading Notepad++ downloader and updater

Powershell application – Get information from a webpage, parse it and show the results

Today I created a nice little 'application' in Powershell. In The Netherlands we have a site called Marktplaats ( which is some sort of combination between e-bay and craiglist. This is one of the biggest sites in The Netherlands, but I was missing some search options on this site and thought they started to show … Continue reading Powershell application – Get information from a webpage, parse it and show the results

How simple some things can be – Powershell indent

In the past few years, I've been using tools to indent my code... Today by accident found out that in Powershell ISE, if you select multiple lines and press tab it'll indent all selected lines... and of course shift+tab will do the reverse. Amazing how simple some things can be without any tool... And how … Continue reading How simple some things can be – Powershell indent

Analyze Robocopy log files and mail the result

A long, long time ago (back in 2008) I created a VBS script which would analyze a folder filled with Robocopy logs and once done analyzing and creating a summary, it would mail the result to me. A couple of days ago I decided it was time to update this script to Powershell. Once I … Continue reading Analyze Robocopy log files and mail the result

Get all (non-default) scheduled tasks

I tried querying the scheduled tasks to give me a list of all (non-default) scheduled tasks. I also wanted to have its schedule information, which appeared to be a pretty hard task in the get-service command. After several unsuccessful attempts, I tried something else with great and immediate results. It appeared that the schtasks did … Continue reading Get all (non-default) scheduled tasks

Get all non-default Windows services

Getting a list of all services isn't that hard. This can be achieved with Get-Service or with Get-WmiObject win32_service. It seems that Get-Service doesn't leave me with enough properties to query and/or filter out, and this time the Get-WmiObject queries work quick enough; thus I'll use this for my code. I wanted a list of all … Continue reading Get all non-default Windows services