Compiling PowerShell script to exe

Intro I’ve been asked the question on “How can I turn my script to an exe-file” more times than I can remember. My answer has always been: -“Just host Windows PowerShell in an executable and run what ever code you like.” Scared of using C# most people has ignored my advice and used some kind of tool to do this, and there is no fault in that (as long as you choose a tool from a provider you trust, not a random tool from a shade site on the Internet).

Validating username and password with PowerShell

Intro Even though we have group managed service account, regular user accounts are still used by various services and applications. The passwords for these accounts are (hopefully) hard to remember and might be shared by a group of people. This means that when it’s time to modify that service , scheduled task or application we haven’t touched in years I really want to make sure I have the right username and password before I start.

Protecting PowerShell secrets with certificate on Yubikey

Intro Sometimes you need to store secrets and PowerShell has a great way of encrypting text for you with the *-CMSMessage cmdlets! Now what if I want other people to be able to encrypt information without being able to decryot it again or if I want to encrypt something myself and only be able to decrypt it by going through a certain procedure like checking out the decryption-key from a secure storage?

When git keeps asking for my password

Intro Are you keeping your PowerShell code version controlled using git? Or any code for that matter. That’s great! Are you having problems accessing private repositories on GitHub or VSTS? Then this post if for you! Git for Windows comes with this awesome component called Git Credential Manager for Windows. It keeps track of all your credentials by storing them in the Windows Credential Store AND it gives us support for multi-factor authentication for Visual Studio Team Services, GitHub and Bitbucket!

Hosting a blog without a server

tl;dr I’ve migrated my blog from WordPress to a static web site hosted on Azure storage. It was way easier than I thought it would be and I don’t regret it for a second! Now I’m hosting this blog on an Azure storage account using static pages generated from MarkDown-files by Hugo. I still have a few things to figure out in regards to web-page optimization, SEO and CI/CD pipeline to make blogging as effortless as possible, but so far my only regret is that I didn’t go down this path sooner.