|
2 | 2 |
|
3 | 3 | Instructions below are relative to the .\ServiceAdmin folder of the [AzureStack-Tools repo](..\). |
4 | 4 |
|
| 5 | +Make sure you have the following module prerequisites installed: |
| 6 | + |
| 7 | +```powershell |
| 8 | +Install-Module -Name AzureRM -RequiredVersion 1.2.8 -Scope CurrentUser |
| 9 | +Install-Module -Name AzureStack |
| 10 | +``` |
| 11 | +Then make sure the following modules are imported: |
| 12 | + |
5 | 13 | ```powershell |
| 14 | +Import-Module ..\Connect\AzureStack.Connect.psm1 |
6 | 15 | Import-Module .\AzureStack.ServiceAdmin.psm1 |
7 | 16 | ``` |
8 | 17 |
|
9 | | -## Create default plan and quota for tenants |
| 18 | +Creating quotas/offers/plans requires that you obtain the GUID value of your Directory Tenant. If you know the non-GUID form of the Azure Active Directory Tenant used to deploy your Azure Stack instance, you can retrieve the GUID value with the following: |
| 19 | + |
| 20 | +```powershell |
| 21 | +$aadTenant = Get-AADTenantGUID -AADTenantName "<myaadtenant>.onmicrosoft.com" |
| 22 | +``` |
10 | 23 |
|
| 24 | +Otherwise, it can be retrieved directly from your Azure Stack deployment. First, add your host to the list of TrustedHosts: |
| 25 | +```powershell |
| 26 | +Set-Item wsman:\localhost\Client\TrustedHosts -Value "<Azure Stack host address>" -Concatenate |
| 27 | +``` |
| 28 | +Then execute the following: |
11 | 29 | ```powershell |
12 | | -$serviceAdminPassword = ConvertTo-SecureString "<Azure Stack service admin password in AAD>" -AsPlainText -Force |
13 | | -$serviceAdmin = New-Object System.Management.Automation.PSCredential -ArgumentList "<myadmin>@<mydirectory>.onmicrosoft.com", $serviceAdminPassword |
| 30 | +$Password = ConvertTo-SecureString "<Admin password provided when deploying Azure Stack>" -AsPlainText -Force |
| 31 | +$AadTenant = Get-AzureStackAadTenant -HostComputer <Host IP Address> -Password $Password |
| 32 | +``` |
14 | 33 |
|
15 | | -New-AzureStackTenantOfferAndQuotas -ServiceAdminCredential $serviceAdmin |
| 34 | +## Create default plan and quota for tenants |
| 35 | + |
| 36 | +```powershell |
| 37 | +New-AzSTenantOfferAndQuotas -tenantID $aadTenant |
16 | 38 | ``` |
17 | 39 |
|
18 | 40 | Tenants can now see the "default" offer available to them and can subscribe to it. The offer includes unlimited compute, network, storage and key vault usage. |
|
0 commit comments