Disable and remove inactive accounts in Active Directory

Quite a few companies don’t have proper account management software to maintain their users in Active Directory . Accounts that remain active while the employees already left the company can be a security risk. This little script will disable and remove inactive accounts. The script performs the following actions:– Disable accounts that have not been…

Removing large folders in Windows

Removing folders with a large quantity of files can take up quite some time. Windows explorer first calculates the the removal time by counting the files and sizes before the removal process eventually starts.There are faster ways to remove these large folder by batch and PowerShell. Both don’t do any form of calculation, but begin…

Nexus Repository Manager 3 unattended configuration with API and PowerShell

Nexus Repository Manager 3 is a tool to create private repositories for Maven, NuGet, Python, Docker and several other package systems. I was requested to automate the installation. The first of the requirements was that it would run on a Windows Server OS. The second one was that two repositories had to be created. One…

Use the Active Directory PowerShell module without installing RSAT

During the creation of a new custom Azure Devops extension for one of my customers, I bumped into the challenge of querying Active Directory. This had to be done on any of the many build servers, but installing Remote Server Administration Tools (RSAT) on every build server was not an option. Therefore the AD PowerShell…

Connect Azure Devops to SonarQube with self-signed certificates

When you are running SonarQube on-premise, it is most likely that you want to use a self-signed certificate to keep the tool secured. Unfortunately, SonarQube is a Java based application, so getting it up and running is not as straight-forward as expected. In my case, after configuring SQ for HTTPS, the SonarQube extension for Azure…

Clean JSON output for ConvertTo-Json

PowerShell 5.1 has nice cmdlet called ConvertTo-Json that converts objects to JSON syntax. Unfortunately, this conversion isn’t very clean. It contains tons of extra white space and querying JSON is not possible for most of the tools including PowerShell. PowerShell-Core 7 received a major update on cmdlet. It actually converts objects into clean JSON code.…

Verify Invoke-WebRequest statuscode 404 with Pester

A 404 result coming from an Invoke-WebRequest is usually a bad thing. This time, however, the 404 is a result I actually hoped to see. I am creating a custom Azure Devops extension that talks with the API of VMWare VRealize 8. The extension allows users to create a new resources such as a VM…