Automating the creation of AVD hosts and host pools
This section looks at setting up PowerShell for AVD and deploying a new host pool using PowerShell.
Setting up PowerShell for AVD
Before we can get started, you first need to install the PowerShell module for AVD. You can do this by opening PowerShell in elevated mode.
Tip
Make sure you install the Az
module. If you haven't already done so, run the Install-Module -Name Az -Force
command.
Once you have opened PowerShell in elevated mode, run the following cmdlet:
Install-Module -Name Az.DesktopVirtualization
The following screenshot shows you how to install the Az.DesktopVirtualization
PowerShell module:
As shown in Figure 6.18, you may be asked to confirm whether you trust the repository.
Next, you will need to connect to Microsoft Azure using the following cmdlet...