
Explanation
Graphical user interface, text, application Description automatically generated

Step 1: Run Get-AzsRegistrationToken
Change the Azure Stack Hub integrated system registration to use an Azure subscription named Subscription3 that has a GUID of 12345678-1234-1234-1234-222222222222.
Get-AzsRegistrationToken
Get-AzsRegistrationToken generates a registration token from the input parameters.
To register the Azure Stack Hub resource provider with Azure, start PowerShell ISE as an administrator and use PowerShell cmdlets with the EnvironmentName parameter set to the appropriate Azure subscription type.
Step 2: Run the Register-AszEnvironment cmdlet and specify the -RegistrationToken $Token parameter.
Step 3: Run the Select-AzSubscription cmdlet and specify the -Subscription
12345678-1234-1234-1234-222222222222 parameter.
To change the azure subscription using PowerShell, we can use the Select-AZSubscription command. When you use this command, you can use either the subscription ID, Subscription Name, or the Tenant ID.
Step 4: Run Set-AszRegistration.
Before proceeding, in the same PowerShell session, verify again that you're signed in to the correct Azure PowerShell context.
This context is the Azure account that was used to register the Azure Stack Hub resource provider. In the same PowerShell session, run the Set-AzsRegistration cmdlet:
$CloudAdminCred = Get-Credential -UserName <Privileged endpoint credentials> -Message "Enter the cloud domain credentials to access the privileged endpoint."
$RegistrationName = "<unique-registration-name>"
Set-AzsRegistration `
-PrivilegedEndpointCredential $CloudAdminCred `
-PrivilegedEndpoint <PrivilegedEndPoint computer name> `
-AgreementNumber <EA agreement number> `
-BillingModel Capacity `
-RegistrationName $RegistrationName
Reference:
https://learn.microsoft.com/en-us/azure-stack/operator/azure-stack-registration
https://learn.microsoft.com/en-us/azure-stack/mdc/operator/registration-tzl