PowerShell

Azure Functions - The ultimate integration platform

Azure Functions is an awesome serverless offering from Microsoft. It lets you deploy a small piece of code as a “function” without having to worry about any underlying infrastructure. A function will then execute on a given event, which for example could be an event from an event service like Event Grid or Event Hubs, a message on a queue like Azure ServiceBus or Azure storage queues, a direct HTTP request like an API call or a webhook, or a timer.

Cloning all repositories from Azure DevOps using Azure CLI

I use a lot of different computers and I have a thing for reimaging my computers way too often. All in all, this means that I find myself sitting in front of a newly installed computer quite often. One thing that I always to on a fresh computer is to clone a bunch of repos from my personal organization in Azure DevOps that contains my notes and a selection of tools that I want available everywhere I go.

Getting an access token for AzureAD using PowerShell and device login flow

Intro Have you ever wanted to query an API that uses access tokens from Azure Active Directory (AzureAD) from a PowerShell script? There are a lot of solutions for this that uses an application in AzureAD and authenticates using its client-id and secret. If I have a web application or a non-interactive service this is the way to go. My friend and colleague Emanuel Palm wrote a great post on Microsoft Graph API with PowerShell for that scenario.

Azure Function App Setting and Container Size not supported error

Intro I deployed an Azure function using ARM template and then tried to manually add an application setting in the portal. Got the following error message: Updating web app settings The specified container size is not supported. Use one of these container sizes: 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536. Searched on the internet, found this issue: https://github.

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).