Identity

Azure Pipeline service principal detail without AD Access

Azure Pipelines are a powerful tool for automating CI/CD workflows, and the AzureCLI task allows you to execute scripts using the Azure CLI. When working with service principals, it’s essential to have their client ID, secret, and object ID at hand. While obtaining the client ID and secret is straightforward using the addSpnToEnvironment property, retrieving the object ID can be a bit more challenging. In this blog post, we’ll explore a workaround to easily fetch the object ID for your service principal, even if it doesn’t have direct read access to Azure AD....

July 25, 2023 · 2 min · LPains
Developer VM

Setting up Hyper-V VM using powershell

It is not uncommon in consulting to work out of dedicated VMs for each customer. This helps create a strong segregation between internal and each client workstream. If you use Hyper-V, chances are that you already have a template VM and use copies of it, so you don’t setup everything over and over. In this post, I will do exactly that, but introduce as much automation using PowerShell as possible....

August 28, 2022 · 5 min · LPains
Developer Environment

Automated and repeatable Developer Environment setup - winget

Back in March I posted about Automated and repeatable Environment Setup. In that version of the environment setup, I used Chocolatey because it has always been my go-to Windows app installer. However, the latest versions of Windows 10 and 11 comes with winget pre-installed. In this post, I will show how to setup a similar developer environment but using winget instead of chocolatey. Similarly to the last post, I will focus on a typical ....

August 25, 2022 · 3 min · LPains
Locks

Convert PFX to PEM for AWS Certificate Manager

When adding a certificate to AWS Certificate Manager, you need to have the certificate’s PEM encoded body, private key, and certificate chain. Note that unless you have a self signed certificate, you will need the certificate chain. If your cert has a chain but you don’t include it AWS will tell you an error occurred but it won’t tell you what’s wrong. I had to try and fail a few times before it worked....

March 9, 2022 · 2 min · LPains
Developer Environment

Automated and repeatable Developer Environment setup

First post of 2022 in March? Sorry for that, it took a while to get traction this year. I have a habit of “starting over” with my development environment once a year at a minimum. That means that I reinstall the OS from scratch and all my tools. This is actually fun and not hard to do at all, but can it be automated? Yes, powershell + chocolatey is a good answer to this....

March 7, 2022 · 4 min · LPains