Azure : MissingSubscriptionRegistration error

Hi, today I will explain you how to correct the problem with MissingSubscriptionRegistration error:

The solution to correct this is very simple, first you need to open a Powershell with Azure Cmdlet installed.

After login to Azure tenant, use the :

Get-AzureRmResourceProvider -ProviderNamespace

In our case, this is the one I used :


Then, I see my Provider in “NotRegistered” :

You need to use this cmdlet :

Register-AzureRmResourceProvider -ProviderNamespace “Microsoft.DevTestLab”

Then, it’s should be OK !

The Auto-Shutdown for VM is now working !

SAS Token with Azure Storage Explorer & DevOps

Hi, In this guide, you will learn how to create a SAS Token with Azure Storage Explorer and use them in DevOps pipeline in some easy steps :

First open Azure Storage Explorer and explore your Blob then list your containers :

Now, right clic on it, then Get SAS :

Then, select the rights policy and copy the SAS Token link :

Great ! Now go to DevOps, open the Pipeline with Azure file copy feature :

Then, use them in the Outptut section and you’re done !

Move Azure Function Apps to another Service Plan

It’s not possible to move a Azure Function Apps to another Service Plan in the portal.
You need to do this in Powershell in some simple steps:

Get the Ressource ID from your new Service Plan :

$afa_plan = Get-AzureRmAppServicePlan -ResourceGroupName $RG -Name $App_Name 

Then just use the Set-AzureRMResource cmdlet to apply the updated properties :

$afa_properties = @{'serverFarmId'=$afa_plan.Id}
Set-AzureRmResource -Kind functionapp -ResourceGroupName $RG -ResourceName $AFA_name -Properties $afa_properties -ResourceType "Microsoft.Web/sites"

That’s all !

Create a Azure webapp in a Resource Group different than the one containing the App Service Plan in Powershell

In Powershell when we would like to create a WebApp, you must specify a Service plan :

 

New-AzureRmWebApp -ResourceGroupName $RG -Name $WEB_Frontend -Location $location_west -AppServicePlan $APP_Service_front

But, if the service plan is in another RG, Azure will create a NEW Service plan in the same RG of the WebApp, this is problematic …

The solution is to specify the service plan ID with :

$APP_Service_front = (Get-AzureRmAppServicePlan -Name $APP_Service_front).Id

And now, the WebApp will be using the new RG and the service plan will stay on the another RG.