Azure VM

Run scripts on VMs after deployment with Bicep

Run scripts on VMs after deployment with Bicep

Do configuration management on your VMs in Azure with post-deployment scripts using Run Commands and Bicep.

Erlend Rushfeldt
Bicep is an IaC-language which is created by Microsoft for Azure. Therefore, it does not have capabilities to do configuration management of Virtual machines directly. There are however ways to do some level of desired state configuration (DSC) on OS-level of Virtual machines using another Azure service. This service is Run Commands! Note that there is other services like Azure Automation and Azure Automanage that do DSC, but this blogpost is about Run Commands.
Introduction to Automanage

Introduction to Automanage

Get a intro to Azure Automanage and set-up best practice configuration for you new and existing VMs.

Erlend Rushfeldt
What if you could make configuring the supporting services of your VMs so much easier? And without needing to assign and manage several policies. This is where Azure Automanage comes flying in like the savior you always needed! What is Automanage? Automanage is as simple as a configuration profile that you apply to your VMs that will automatically configure the services that are best practice for VMs in Azure. For example, Azure Log Analytics and Azure Backup.
Use Run Command to run scripts on your VM

Use Run Command to run scripts on your VM

Manage your VM by running PowerShell script straight from the Azure Portal.

Erlend Rushfeldt
I started my previous blog by introducing Azure Run Command as a feature to run Powershell and Bash scripts on VMs straight from the Azure Portal. In this blog I’m gonna dive deeper into the feature and show a real life example of how to use it. The two versions of Run Command Something I didn’t mention in my last blog is that there are actually two different versions of Run Command.
VM operations in Azure without RDP

VM operations in Azure without RDP

How do you manage your VMs in Azure without needing to RDP to them?

Erlend Rushfeldt
The “Traditional” way to manage servers was to RDP or SSH into them and apply the changes you needed to do. And this was regarded as safe to do (Not by everyone of course) since you usually already were inside the office or datacenter. But when your servers are in another datacenter or even on the other side of the world, what can you do then? You can just open up RDP for your IP-address or a whole range of IP-addresses, but it is not recommended.