Doug Finke recently published a module for doing Fuzzy Searching with PowerShell. I forked his project and added code to get valued score for the results, and created a PR to his project. He suggested I publish my changes on my own, so I did. I already had a module planned for my approximate string matching algorithms, so I combined the two into one module – Communary.PASM. (more…)
Category: PowerShell
Automatically convert MarkDown to HTML in Visual Studio Code, with syntax highlighting!
I was investigating the possibility of automatically converting markdown documents into HTML, and came across this article from the Visual Studio Code documentation. It details how, using the Task Runner and a Node.js module called Marked, you could set up a task that do exactly what I was after. (more…)
Creating demo users in Active Directory
For a task at work I had to create a number of users in Active Directory for a demo environment I had to set up. I didn’t really want to do this manually, and I wanted something more realistic than ‘DemoUser 01’, ‘DemoUser 02’ and so on. (more…)
Inline Progress Bar in PowerShell
In a previous post, I have touched upon the fact that Write-Progress can be quite slow, especially when used in the console host (as opposed to in ISE). So I started to roll my own, with a crucial difference; this progress bar is used inline. (more…)
Quick tip: Seamlessly switch between different prompts
Most users are probably happy with the default PowerShell prompt. But there are a handful of people that are not satisfied with any product unless they have had a chance to customize it to their needs. Luckily PowerShell supports defining your own prompt quite easily. Then there are another few that for some reason likes to have multiple prompts that they alternate between. Perhaps they have one for home, one for work and another one when they are presenting at usergroups and conferences. (more…)
How to add more fonts to the console
In Windows 10, Microsoft have finally made some good additions to the console application. But there is still rooms for improvements. You have the option to change the console font, but they have made it really awkward to add additional fonts to the font list. (more…)
Quick tip: Handling non-ASCII characters in Internet domain names
The character set allowed in the Domain Names System is based on ASCII, but ICANN have later approved the Internationalized domain name (IDNA) system. It was proposed in 1996 and first implemented in 1998, and lets you use characters outside the ASCII-only scheme (Unicode). (more…)
Get reminded of outdated modules
The PowerShell Gallery is wonderful. Finally we have package management system in place, and installing and updating modules have never been easier. But you still have to remember to check for updated modules. What if you could be reminded of outdated modules every time you start PowerShell? (more…)
The Luhn Algorithm
Created by the german IBM scientist Hans Peter Luhn, the Luhn Algorithm is a checksum formula being used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers etc.
In this blog post, I will show you some functions I created that uses this algorithm. It can be used to calculate a checksum digit from a number, as well as validate numbers using the Luhn Algorithm checksum validation.
Remove-Characters
This little function lets you remove characters from a string. The twist is that it takes a character array, and will remove all characters in it from the input string. (more…)