Automate login for Azure Powershell scripts

Automation is great. It's the bedrock of any successful IT department and the default solution for any task that has to be repeated more than once. I'm a big proponent of automation and, since I spend most of my time in Azure, I try to automate as many tasks as I can. Today, I'll explain how to automate your Azure login in order to allow your scripts to run without any supervision. Disclaimer: many of these tasks should be running using the Azure Automation service because of better integration and smoother on boarding. There's a ton of ready-made RunBooks in …[read more]


Options for Migrating Azure VMs from ASM (v1) to ARM (v2)

Today, the Azure portal allows you to create 2 types of VMs. These types refer mainly to the platform atop which your VMs run. Before I continue with this post, it may be handy establishing what the terminology means: Classic/ASM Classic or v1 VMs run on top of the older Azure Service Management (ASM) technology. ASM infrastructures can be managed through both the old and the new portals and Azure PowerShell/CLI. However, some of the v1 features are not yet, and may never be, available on the new Azure Portal. New/ARM Resource Manager or v2 VMs run …[read more]


Entity Framework Core 1.0 - Table Valued Functions and LINQ Composition

Entity framework Core (EFCore) has been out for a few weeks now after hitting RTM on June 27th 2016. That was also the same day that ASP.NET Core was released. EFCore has brought many changes, to say the least. It was renamed to Core instead the logical continuation from Entity Framework, because it's a total rewrite. Very similar to ASP.NET Core. The rewrite brought many benefits with speed being the biggest one. EF Core is simpler and a lot more powerful, even though it's still early days and some things are not working as expected or are missing. …[read more]


Copying blob data between storage accounts on Azure. Did you say scale? (part 1)

A couple of weeks ago I published a post for copying data between storage accounts using Azure Functions. The code for the function is quite basic and responds only to upload events. Every time someone uploads blobs to a container monitored by the Function, the blob gets automatically copied across to the destination storage account. That’s great for small workloads. But, what about copying 100k blobs from one storage account to another? And how about making that task super scalable? Challenge accepted! In this post I will explain how to solve this problem using the .NET Azure SDK and …[read more]


ASP.NET Core from the command line

ASP.NET Core (formerly known as ASP.NET 5 or vNext) runs on top of the new DotNet Core and is in love with the command line. Although Visual Studio 2015 is still an excellent IDE and Visual Studio Code an amazing code editor, the new iteration of ASP.NET is equally powerful with the command line. ASP.NET Core 1.0 hit RTM on June 27th, however the tooling around it is still in Preview. Things are still changing, mainly because there's still work to be done around the csproj/project.json migration and dotnet native. How to install …[read more]


Configure a RunOnce task on Windows

Today was one of these days. Faced with a new problem I've never come across before. I was trying to configure a task to run once and only once on the server was provisioned for the first time. Something like a bootstrap script. In my quest to solve that problem, I came across a thing called Run and RunOnce registry keys! What are Run(Once) registry keys? Who knew that these things even existed, but here we are. So what do these keys really do? Let's grab the definition from the official documentation on MSDN Run and RunOnce registry keys …[read more]