Azure Azure Stack Configuration Testing

Azure Stack – Azure Stack Development Kit Azure Registration

Bildergebnis für register graphic cloud

The next step in our Azure Stack Development Kit journey is to join Azure. In order to download marketplace items from Azure and to set up commerce data reporting back to Microsoft, we will need to register Azure Stack in Azure. This is required to support full Azure Stack functionality, including marketplace syndication. If you followed my previous posts then your environment should be ready to join the Azure Stack Development Kit to the Azure / Azure Active Directory. Note here, usage is reported to Azure commerce and you can see it under the subscription you used for registration. However, ASDK users aren’t charged for any usage they report.

If we open the administration portal and navigate to the Marketplace management we will see a note to register ASDK…


Ok so what do we need to do? First we need to check the PowerShell language mode on the Azure Stack Development Kit host. The different language modes are described here . Check that the full language mode is supported…


If so, you need to run the following script, again on the Azure Stack Development Kit host (!)…

# Add the Azure cloud subscription environment name.
# Supported environment names are AzureCloud, AzureChinaCloud or AzureUSGovernment depending which Azure subscription you are using.
Add-AzureRmAccount –EnvironmentName “ENVIRONMENT” # e.g "AzureCloud"

Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION" | Select-AzureRmSubscription

# Register the Azure Stack resource provider in your Azure subscription
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack

#Import the registration module that was downloaded with the GitHub tools
Import-Module C:\AzureStack-Tools-master\Registration\RegisterWithAzure.psm1

#Register Azure Stack
$AzureContext = Get-AzureRmContext
$CloudAdminCred = Get-Credential -UserName AZURESTACK\CloudAdmin -Message "Enter the credentials to access the privileged endpoint."
$RegistrationName = “REGISTRATIONNAME” # e.g."DemoAzureStack01"
$UsageReporting = $true # Set to False if you using a Capacity Billing Model
Set-AzsRegistration `
-PrivilegedEndpointCredential $CloudAdminCred `
-PrivilegedEndpoint AzS-ERCS01 `
-BillingModel Development `
-RegistrationName $RegistrationName `
-UsageReportingEnabled $UsageReporting `
-AzureContext $AzureContext

…the script is well documented so there is not much to say, except two things. First you need to change the parameter values to your environment. The other thing is, that the script in the documentation has a bug. The Set-AzsRegistration –AzureContext parameter has not been set. I got an error when I used the provided source…


…somehow it could not resolve the environment, after I used the script above and provided the $AzureContext value, the registration succeeded…


As I can tell from the issues, the used PowerShell module is under constant change, so please check the source to figure out what the bugs are.

After the successful registration we will be able to browse the Marketplace in ASDK from Azure…


…for example we are able to download a Windows Server 2016 image…


The script will create a service principal Azure Bridge…


…a resource group called “azurestack” and some resource providers and assigning RBAC…


I would highly recommend testing your configuration before doing any serious installation and checking the source of the module. Now you are able to explore the Azure Marketplace within ASDK. I followed the steps from Microsoft to get it up and running, it can be found here.

If you want to get all details check the log file under C:\MASLogs\Registration on your Azure Stack Development Kit host…


Happy shopping Smile.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.