You need to power on all session hosts in a specific resource group at 07:30 on weekdays and deallocate them at 20:00 if a scaling plan isn’t used. You will use Azure Automation. What should you implement? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Assign the Automation account’s system-assigned managed identity the Virtual Machine Contributor role on the resource group containing the session hosts., Create an Automation schedule for 07:30 and 20:00 and link it to a PowerShell runbook that starts or stops VMs filtered by a specific tag..
Why this is the answer
To manage session host power states with Azure Automation, you need two key components. First, the Automation account requires permissions to interact with the virtual machines. Assigning the system-assigned managed identity the "Virtual Machine Contributor" role on the resource group containing the session hosts grants the necessary permissions to start and stop VMs. This is a secure and recommended approach for authentication. Second, you need a mechanism to trigger these actions at specific times. An Azure Automation schedule linked to a PowerShell runbook allows you to define the 07:30 power-on and 20:00 deallocation times. The runbook would contain the logic to start or stop VMs, potentially using tags for filtering. Incorrect options: Granting access only to the host pool resource is insufficient; VM-level permissions are required to start/stop the actual virtual machines. Classic Run As accounts are deprecated and less secure than managed identities. Storing local administrator passwords and using PowerShell Remoting is unnecessary and insecure for this task, as Azure Automation can directly manage VM power states via Azure Resource Manager.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed