Table of Contents
Question
You have an Azure Virtual Desktop deployment that contains a host pool named Pool1. Pool1 contains 10 session hosts that were deployed by using an Azure Resource Manager (ARM) template. You discover that Windows licenses were NOT applied to the session hosts. You need to use a PowerShell script to update the licenses. Which cmdlet should you include in the solution?
A. Update-AzVm
B. Update-AzWvdDesktop
C. Update-AzWvdHostPool
D. Update-AzWvdWorkspace
E. Update-AzWvdSessionHost
Answer
E. Update-AzWvdSessionHost
Explanation
The correct answer is E. Update-AzWvdSessionHost.
The Update-AzWvdSessionHost cmdlet updates a Windows Virtual Desktop session host. You can use this cmdlet to update the operating system, software, or other settings on a session host.
In this case, you need to update the Windows licenses on the session hosts in Pool1. You can do this by using the following PowerShell script:
# Update the Windows licenses on the session hosts in Pool1
$sessionHosts = Get-AzWvdSessionHost -ResourceGroupName "MyResourceGroup" -HostPoolName "Pool1"
foreach ($sessionHost in $sessionHosts)
{
Update-AzWvdSessionHost -SessionHost $sessionHost -LicenseType "Windows10Enterprise"
}
This script will update the license type of all session hosts in Pool1 to Windows10Enterprise.
Here is a more detailed explanation of the different cmdlets that you could have used to solve this problem:
- Update-AzVm – This cmdlet updates a virtual machine. You can use this cmdlet to update the operating system, software, or other settings on a virtual machine. However, you cannot use this cmdlet to update the Windows licenses on a virtual machine.
- Update-AzWvdDesktop – This cmdlet updates a Windows Virtual Desktop desktop. You can use this cmdlet to update the operating system, software, or other settings on a Windows Virtual Desktop desktop. However, you cannot use this cmdlet to update the Windows licenses on a Windows Virtual Desktop desktop.
- Update-AzWvdHostPool – This cmdlet updates a Windows Virtual Desktop host pool. You can use this cmdlet to update the configuration of a host pool, such as the number of session hosts in the pool or the operating system image that is used to create session hosts. However, you cannot use this cmdlet to update the Windows licenses on the session hosts in a host pool.
- Update-AzWvdWorkspace – This cmdlet updates a Windows Virtual Desktop workspace. You can use this cmdlet to update the configuration of a workspace, such as the number of users that can be assigned to the workspace or the policies that are applied to the workspace. However, you cannot use this cmdlet to update the Windows licenses on the session hosts in a workspace.
Reference
- Exam AZ-140: Configuring and Operating Microsoft Azure Virtual Desktop – Certifications | Microsoft Learn
- Study guide for Exam AZ-140: Configuring and Operating Microsoft Azure Virtual Desktop | Microsoft Learn
- Course AZ-140T00–A: Configuring and Operating Microsoft Azure Virtual Desktop – Training | Microsoft Learn
- Microsoft Certified: Azure Virtual Desktop Specialty – Certifications | Microsoft Learn
- Use Azure CLI and Azure PowerShell with Azure Virtual Desktop | Microsoft Learn
- Windows Virtual Desktop Cmdlets for Windows PowerShell – Azure | Microsoft Learn
- Azure Virtual Desktop PowerShell – Azure | Microsoft Learn
- View Microsoft 365 licenses and services with PowerShell – Microsoft 365 Enterprise | Microsoft Learn
Configuring and Operating Windows Virtual Desktop on Microsoft Azure AZ-140 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Configuring and Operating Windows Virtual Desktop on Microsoft Azure AZ-140 exam and earn Configuring and Operating Windows Virtual Desktop on Microsoft Azure AZ-140 certification.