Automating the management of host pools, session hosts, and user sessions using PowerShell
This section uses the Azure Command-Line Interface (CLI) and Azure Automation accounts to repeat tasks and simplify tasks such as logging off multiple users in a batch.
Configuring an Azure automation runbook
This subsection takes you through creating an Azure automation runbook, configuring the runbook, testing, and configuring a runbook schedule.
Importing PowerShell modules into the Automation account
First, we must prepare the Automation account with the correct PowerShell modules, which can be imported using the module gallery. If you have deployed a new Automation account, there is a good chance that the modules are already imported. If so, you can skip this step.
The following modules need to be imported:
Az.DesktopVirtualization
Az.Accounts
Az.Resources
The following screenshot shows the Automation account’s module gallery, where you would...