Post ASDK installation configuration tasks
After installing the Azure Stack Development Kit (ASDK), you should make a few recommended post-installation configuration changes while logged in as AzureStack\AzureStackAdmin on the ASDK host computer.
Install Azure Stack PowerShell
Azure Stack compatible Azure PowerShell modules are required to work with Azure Stack.
PowerShell commands for Azure Stack are installed through the PowerShell Gallery. To register the PSGallery repository, open an elevated PowerShell session and run the following command:
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
You can use API version profiles to specify Azure Stack compatible AzureRM modules. API version profiles provide a way to manage version differences between Azure and Azure Stack. An API version profile is a set of AzureRM PowerShell modules with specific API versions. The AzureRM.Bootstrapper module that is available through the PowerShell Gallery provides PowerShell cmdlets that are required to work with API version profiles.
You can install the latest Azure Stack PowerShell module with or without Internet connectivity to the ASDK host computer:
Before installing the required version, make sure that you uninstall any existing Azure PowerShell modules.
With an internet connection from the ASDK host computer. Run the following PowerShell script to install these modules on your development kit installation:
Azure Stack 1901 or later:
# Install and import the API Version Profile required by Azure Stack into the current PowerShell session. Install-Module AzureRM -RequiredVersion 2.4.0 Install-Module -Name AzureStack -RequiredVersion 1.7.0
The Azure Stack module version 1.7.0 is a breaking change. To migrate from Azure Stack 1.6.0 please refer to the migration guide.
Azure Stack 1811:
# Install the AzureRM.Bootstrapper module. Select Yes when prompted to install NuGet. Install-Module -Name AzureRm.BootStrapper # Install and import the API Version Profile required by Azure Stack into the current PowerShell session. Use-AzureRmProfile -Profile 2018-03-01-hybrid -Force # Install Azure Stack Module Version 1.6.0. Install-Module -Name AzureStack -RequiredVersion 1.6.0
Azure Stack 1810 or earlier:
# Install the AzureRM.Bootstrapper module. Select Yes when prompted to install NuGet. Install-Module -Name AzureRm.BootStrapper # Install and import the API Version Profile required by Azure Stack into the current PowerShell session. Use-AzureRmProfile -Profile 2018-03-01-hybrid -Force # Install Azure Stack Module Version 1.5.0. Install-Module -Name AzureStack -RequiredVersion 1.5.0
If the installation is successful, the AzureRM and AzureStack modules are displayed in the output.
Without an internet connection from the ASDK host computer. In a disconnected scenario, you must first download the PowerShell modules to a machine that has internet connectivity using the following PowerShell commands:
$Path = "<Path that is used to save the packages>" Save-Package ` -ProviderName NuGet -Source https://www.powershellgallery.com/api/v2 -Name AzureRM -Path $Path -Force -RequiredVersion 2.3.0 Save-Package ` -ProviderName NuGet -Source https://www.powershellgallery.com/api/v2 -Name AzureStack -Path $Path -Force -RequiredVersion 1.5.0
Next, copy the downloaded packages to the ASDK computer and register the location as the default repository and install the AzureRM and AzureStack modules from this repository:
$SourceLocation = "<Location on the development kit that contains the PowerShell packages>" $RepoName = "MyNuGetSource" Register-PSRepository -Name $RepoName -SourceLocation $SourceLocation -InstallationPolicy Trusted Install-Module AzureRM -Repository $RepoName Install-Module AzureStack -Repository $RepoName
Download the Azure Stack tools
AzureStack-Tools is a GitHub repository that hosts PowerShell modules for managing and deploying resources to Azure Stack. To obtain these tools, clone the GitHub repository or download the AzureStack-Tools folder by running the following script:
# Change directory to the root directory. cd \ # Enforce usage of TLSv1.2 to download the Azure Stack tools archive from GitHub [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 invoke-webrequest ` https://github.com/Azure/AzureStack-Tools/archive/master.zip ` -OutFile master.zip # Expand the downloaded files. expand-archive master.zip -DestinationPath . -Force # Change to the tools directory. cd AzureStack-Tools-master
Validate the ASDK installation
To ensure that your ASDK deployment was successful, you can use the Test-AzureStack cmdlet by following these steps:
- Log in as AzureStack\AzureStackAdmin on the ASDK host computer.
- Open PowerShell as an administrator (not PowerShell ISE).
Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint
The tests take a few minutes to complete. If the installation was successful, the output looks something like:
If there was a failure, follow the troubleshooting steps to get help.
Reset the password expiration policy
To make sure that the password for the development kit host doesn't expire before your evaluation period ends, follow these steps after you deploy the ASDK.
To change the password expiration policy from Powershell
From an elevated Powershell console, run the command:
Set-ADDefaultDomainPasswordPolicy -MaxPasswordAge 180.00:00:00 -Identity azurestack.local
To change the password expiration policy manually
- On the development kit host, open Group Policy Management (GPMC.MMC) and navigate to Group Policy Management – Forest: azurestack.local – Domains – azurestack.local.
- Right-click Default Domain Policy and click Edit.
- In the Group Policy Management Editor, navigate to Computer Configuration – Policies – Windows Settings – Security Settings – Account Policies – Password Policy.
- In the right pane, double-click Maximum password age.
- In the Maximum password age Properties dialog box, change the Password will expire in value to 180, and then click OK.
For deployments using Azure AD, you need to enable multi-tenancy for your ASDK installation.
When administrator or user accounts from domains other than the one used to register Azure Stack are used to log in to an Azure Stack portal, the domain name used to register Azure Stack must be appended to the portal url. For example, if Azure Stack has been registered with fabrikam.onmicrosoft.com and the user account logging in is email@example.com, the url to use to log into the user portal would be: https://portal.local.azurestack.external/fabrikam.onmicrosoft.com.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.