Register with ARC and assign permissions for Azure Stack HCI Deployment 23H2

Prerequisites:

  • a prepared Active Directory (see link)
  • a preconfigured node equipped with Azure Stack HCI OS 23H2 (see link and link)
  • Contributor permissions and User Access Administrator permissions for the subscription

Register servers with Azure Arc

1. Install the Arc registration script

#Register PSGallery as a trusted repo
Register-PSRepository -Default -InstallationPolicy Trusted

In my case, the repo was already available 👆.

#Install Arc registration script from PSGallery 
Install-Module AzsHCI.ARCinstaller
#Install required PowerShell modules in your node for registration
Install-Module Az.Accounts -Force
Install-Module Az.ConnectedMachine -Force
Install-Module Az.Resources -Force

2. Collecting all the necessary information and parameters:

 #Define the subscription where you want to register your server as Arc device
 $Subscription = "YyourSubscriptionID"

 #Define the resource group where you want to register your server as Arc device
 $RG = "YourResourceGroupName"

 #Define the tenant you will use to register your server as Arc device
 $Tenant = "YourTenantID"
Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
#Get the Access Token for the registration
$ARMtoken = (Get-AzAccessToken).Token

#Get the Account ID for the registration
$id = (Get-AzContext).Account.Id 

3. Run the Arc registration script

#Invoke the registration script. For this release, eastus and westeurope regions are supported.
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region westeurope -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id

4. Result

In some instances, running the Arc registration script doesn't install the mandatory extensions, Azure Edge device Management or Azure Edge Lifecycle Manager. The workaround is to run the script again and make sure that all the mandatory extensions are installed before you Deploy via Azure portal.

Everything went well 👇!

Assign required permissions for deployment

Go to the resource group used to register the servers 👇

Select the user  👆 you want to use for the Azure Stack HCI deployment .

Reference:

Register your Azure Stack HCI servers with Azure Arc and assign permissions for deployment - Azure Stack HCI
Learn how to Register your Azure Stack HCI servers with Azure Arc and assign permissions for deployment.