Today Microsoft releasted the first powershell module for Azure blueprints (at long last 🙂 ).

This first version 0.1.0, has some basic commands like “Get-AzBlueprint”, “Get-AzBlueprintAssignment” , “Remove-AzBlueprintAssignment”, “Set-AzBlueprintAssignment” and “New-AzBlueprintAssignment”.

To install the new module, just do a “install-module -Name az.blueprint”, you will need new Azure PowerShell Az module

To do a Blueprint assigment you would do something like this :

$blueprintName = “TestBluePrint2”
$subscriptionId = “00000000-1111-0000-1111-000000000000″‘
$AssignmentName = “BP-Assignment”
$myBluerpint = Get-AzBlueprint -Name $blueprintName -LatestPublished
$rg = @{ResourceGroup=@{name=’RG-BP-TEST1′}}

New-AzBlueprintAssignment -Name $AssignmentName -Blueprint $myBluerpint -SubscriptionId $subscriptionId -Location “West US” -ResourceGroupParameter $rg

This is a simple Blueprint that creates a resource group and nothing more.

If you want to use a managed identity you just add -UserAssignedIdentity “/subscriptions/00000000-1111-0000-1111-0000000 00000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-user-defined-identity” the default is to use system-assigned identity.
If your blueprint uses parameter eg. in a ARM template, then you can use the -Parameter @{P1=”v1″; P2=”v2″} parameter.

I think this is a great tool for deploying Azure blueprint and I will be following this closely.