AZ-140 · Question #109
You have an Azure Virtual Desktop deployment. You need to create a PowerShell script to sign users out of a specific session host before you perform a maintenance task. Which PowerShell module should
The correct answer is D. Az.DesktopVirtualization. The Az.DesktopVirtualization PowerShell module contains the cmdlets specific to managing Azure Virtual Desktop (AVD) resources. To sign users out of a session host, you would use Remove-AzWvdUserSession, which is part of this module. It allows you to enumerate active user session
Question
You have an Azure Virtual Desktop deployment. You need to create a PowerShell script to sign users out of a specific session host before you perform a maintenance task. Which PowerShell module should you load in the script?
Options
- AAz.Automation
- BAz.Compute
- CAz.Maintenance
- DAz.DesktopVirtualization
How the community answered
(60 responses)- A2% (1)
- B8% (5)
- C3% (2)
- D87% (52)
Explanation
The Az.DesktopVirtualization PowerShell module contains the cmdlets specific to managing Azure Virtual Desktop (AVD) resources. To sign users out of a session host, you would use Remove-AzWvdUserSession, which is part of this module. It allows you to enumerate active user sessions on a host (Get-AzWvdUserSession) and then forcibly log them off. The other modules are unrelated to AVD session management: Az.Automation handles runbooks and automation accounts, Az.Compute manages virtual machines and disks, and Az.Maintenance handles maintenance configurations for Azure resources - none of which expose AVD session control cmdlets.
Topics
Community Discussion
No community discussion yet for this question.